/* Layout */
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: #1a1a1a;
  background: #f7f9fb;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
}

.page-header {
  text-align: center;
  margin-bottom: 24px;
}

h1 {
  font-style: italic;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  color: #073858;
  margin: 0 0 8px;
  font-size: 2rem;
}

.intro {
  color: #4a5568;
  margin: 0;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.content-panel {
  background: #fff;
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(7, 56, 88, 0.08);
}

.section-heading {
  font-size: 1.15rem;
  color: #073858;
  margin: 0 0 16px;
  font-weight: 600;
  font-family: inherit;
  font-style: normal;
}

.content-panel p,
.content-panel li {
  line-height: 1.7;
  color: #2d3748;
  margin-top: 0;
}

.content-panel p:last-child,
.content-panel ul:last-child {
  margin-bottom: 0;
}

.content-panel a {
  color: #073858;
  font-weight: 600;
}

.content-panel a:hover {
  color: #18ed98;
}

.feature-list {
  padding-left: 1.2rem;
  margin-bottom: 0;
}

.feature-list li {
  margin-bottom: 0.5rem;
}

.feature-list li:last-child {
  margin-bottom: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Taskbar */
.taskbar {
  background: #073858;
  padding: 0;
  margin: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  margin-left: 20px;
  margin-right: 30px;
  text-decoration: none;
}

.logo img {
  height: 38px;
  width: 38px;
  border-radius: 8px;
  margin-right: 10px;
}

.logo span {
  color: #18ed98;
  font-size: 1.3rem;
  font-weight: bold;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  width: 40px;
  height: 40px;
  margin-left: auto;
  margin-right: 20px;
  z-index: 1001;
}

.hamburger span {
  height: 4px;
  width: 28px;
  background: #18ed98;
  margin: 4px 0;
  border-radius: 2px;
  transition: 0.3s;
  display: block;
}

.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.taskbar ul {
  list-style: none;
  display: flex;
  justify-content: flex-start;
  margin: 0;
  padding: 0;
}

.taskbar li {
  margin: 0 20px;
}

.taskbar a {
  display: block;
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 18px 24px;
  transition: color 0.2s, border-bottom 0.2s;
  border-bottom: 2px solid transparent;
  letter-spacing: 0.08em;
}

.taskbar a:hover,
.taskbar a.active {
  color: #18ed98;
  border-bottom: 2px solid #18ed98;
}

@media (max-width: 800px) {
  .hamburger {
    display: flex;
  }

  .taskbar ul {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background: #073858;
    flex-direction: column;
    align-items: flex-start;
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
  }

  .taskbar ul.open {
    display: flex;
  }

  .taskbar li {
    margin: 0;
    width: 100%;
  }

  .taskbar a {
    padding: 16px 24px;
    width: 100%;
    border-bottom: 1px solid #18ed98;
  }
}

/* Search */
#search-form {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

#search-input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid #cbd5e0;
  border-right: none;
  border-radius: 8px 0 0 8px;
  outline: none;
  background: #fff;
}

#search-input:focus {
  border-color: #073858;
  box-shadow: inset 0 0 0 1px #073858;
}

button {
  padding: 12px 22px;
  font-size: 1rem;
  border: none;
  background: #073858;
  color: #fff;
  border-radius: 0 8px 8px 0;
  cursor: pointer;
  transition: background 0.2s;
  font-family: inherit;
}

button:hover:not(:disabled) {
  background: #0a4a72;
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.status {
  text-align: center;
  color: #718096;
  font-size: 0.95rem;
  min-height: 1.4em;
  margin: 0 0 20px;
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.gif-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #f7f9fb;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gif-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.gif-card img {
  width: 100%;
  height: auto;
  display: block;
  background: #edf2f7;
}

.gif-actions {
  display: flex;
  gap: 8px;
  padding: 10px;
  background: #fff;
}

.gif-action-btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.85rem;
  border-radius: 6px;
  border: 1px solid #073858;
  background: #fff;
  color: #073858;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.gif-action-btn:hover {
  background: #073858;
  color: #fff;
}

.message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 32px 16px;
  color: #4a5568;
  background: #f7f9fb;
  border-radius: 10px;
}

.message.loading {
  color: #718096;
}

.message.error {
  color: #c53030;
}

.load-more {
  display: block;
  margin: 28px auto 0;
  border-radius: 8px;
  min-width: 160px;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 20px;
  background: #073858;
  color: #fff;
  font-size: 0.95rem;
  margin-top: auto;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: #18ed98;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .container {
    padding: 24px 12px;
  }

  .content-panel {
    padding: 20px 16px;
  }

  h1 {
    font-size: 1.75rem;
  }

  #search-form {
    flex-direction: column;
    gap: 10px;
  }

  #search-input {
    border-right: 1px solid #cbd5e0;
    border-radius: 8px;
  }

  #search-form button {
    border-radius: 8px;
    width: 100%;
  }

  .gif-actions {
    flex-direction: column;
  }
}
