body {
  font-family: "Poppins", sans-serif;
  margin: 20px;
  background-color: #f4f4f4;
  color: #333;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}
.container {
  max-width: 900px;
  margin: auto;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  transition: background 0.3s, box-shadow 0.3s;
}
h1 {
  color: #555;
  text-align: center;
  padding-bottom: 40px;
  margin-bottom: -20px;
  border-bottom: 1px solid #ffffff71;
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0px;
  margin-top: 20px;
}
.search-container {
  flex-grow: 1;
  margin-right: 10px;
}
#search-input {
  width: 100%;
  max-width: 300px;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 1em;
  outline: none;
  transition: all 0.3s ease-in-out;
}
#search-input:focus {
  border-color: #007bff;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.2);
}
body.dark-mode #search-input {
  background-color: #333;
  color: #fff;
  border-color: #555;
}
.controls {
  display: flex;
  gap: 10px;
}
.controls button {
  background-color: #00c6ff;
  color: white;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  margin-left: 5px;
  font-size: 1.2em;
  width: 40px;
  height: 40px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s;
}
.controls button:hover {
  background-color: #0056b3;
}
.list-view {
  list-style-type: none;
  padding-left: 0;
}

/* Gaya Tampilan List */
.list-view li {
  background: #eee;
  margin-bottom: 10px;
  padding: 15px;
  border-left: 5px solid #007bff;
  border-radius: 4px;
  transition: all 0.3s ease-in-out;
}
.list-view li:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}
.list-view li a {
  text-decoration: none;
  color: #007bff;
  font-weight: bold;
}
.list-view li a:hover {
  text-decoration: underline;
}
.list-view li p {
  margin: 5px 0 0;
  font-size: 0.9em;
  color: #666;
  transition: color 0.3s;
}

/* Gaya Tampilan Grid */
.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  list-style-type: none;
  padding: 0;
}
.grid-view li {
  background: #eee;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
}
.grid-view li:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}
.grid-view li a {
  text-decoration: none;
  color: #007bff;
  font-weight: bold;
}
.grid-view li a:hover {
  text-decoration: underline;
}
.grid-view li p {
  font-size: 0.9em;
  color: #666;
  margin: 0;
  transition: color 0.3s;
}

/* Gaya untuk list-view */
.list-view li,
.grid-view li {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Mode Gelap (Dark Mode) */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}
body.dark-mode .container {
  background: #1e1e1e;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}
body.dark-mode h1 {
  color: #fff;
}
body.dark-mode .list-view li {
  background: #2a2a2a;
  border-left: 5px solid #00c6ff;
}
body.dark-mode .grid-view li {
  background: #2a2a2a;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}
body.dark-mode a {
  color: #00c6ff;
}
body.dark-mode p {
  color: #b0b0b0;
}

.language-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: middle;
}
.lang-JavaScript {
  background-color: #f1e05a;
}
.lang-Python {
  background-color: #3572a5;
}
.lang-HTML {
  background-color: #e34c26;
}
.lang-CSS {
  background-color: #563d7c;
}
.lang-Java {
  background-color: #b07219;
}
.lang-Ruby {
  background-color: #701516;
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  font-size: 0.9em;
  color: #888;
  border-top: 1px solid #35353546;
  transition: all 0.3s ease-in-out;
}
a {
  text-decoration: none;
  color: inherit;
}
footer a {
  text-decoration: none;
  color: #888;
  transition: color 0.3s ease-in-out;
}
footer a:hover {
  color: #007bff;
  color: #b0b0b0;
  border-top: 1px solid #333;
}

/* Media query untuk ukuran layar di bawah 600px */
@media (max-width: 600px) {
  h1 {
    font-size: 1.8em;
    border-bottom: transparent;
  }
  .container {
    padding: 10px;
  }
  .header-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 10px;
  }
  .search-container {
    width: 100%;
    margin-right: 0;
    margin-bottom: 15px;
  }
  #search-input {
    max-width: 250px;
  }
  .controls {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
  }
  .controls button {
    width: 30px;
    height: 30px;
    font-size: 1.1em;
    margin-left: 0px;
  }
  .grid-view {
    grid-template-columns: 1fr;
  }
}
