@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@300;400;500;600;700&display=swap');

@font-face {
  font-family: "PP Editorial New Ultralight";
  src: url("https://db.onlinewebfontFs.com/t/23ed6ab5114b3c4b57abae46cf8a5029.eot");
  src: url("https://db.onlinewebfonts.com/t/23ed6ab5114b3c4b57abae46cf8a5029.eot?#iefix") format("embedded-opentype"),
       url("https://db.onlinewebfonts.com/t/23ed6ab5114b3c4b57abae46cf8a5029.woff2") format("woff2"),
       url("https://db.onlinewebfonts.com/t/23ed6ab5114b3c4b57abae46cf8a5029.woff") format("woff"),
       url("https://db.onlinewebfonts.com/t/23ed6ab5114b3c4b57abae46cf8a5029.ttf") format("truetype"),
       url("https://db.onlinewebfonts.com/t/23ed6ab5114b3c4b57abae46cf8a5029.svg#PP Editorial New Ultralight") format("svg");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-color: #faf8f5;
  --text-color: #1a1a1a;
  --accent-color: #b8860b;
  --accent-light: #daa520;
  --input-bg: #ffffff;
  --input-text: #1a1a1a;
  --border-color: #e8e2d5;
  --muted: #6b6b6b;
  --shadow: rgba(184, 134, 11, 0.08);
  --gap: 20px;
}

[data-theme="dark"] {
  --bg-color: #0a0a0a;
  --text-color: #f5f5f5;
  --accent-color: #daa520;
  --accent-light: #f4d03f;
  --input-bg: #1a1a1a;
  --input-text: #f5f5f5;
  --border-color: #2a2a2a;
  --muted: #a0a0a0;
  --shadow: rgba(218, 165, 32, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter Tight", -apple-system, BlinkMacSystemFont, sans-serif;
}

*:not(input):not(select):not(button) {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(135deg, var(--bg-color) 0%, color-mix(in srgb, var(--bg-color) 95%, var(--accent-color)) 100%);
  color: var(--text-color);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(184, 134, 11, 0.03) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(184, 134, 11, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.app {
  width: 100%;
  max-width: 1200px;
  margin: 40px auto;
  padding: 40px;
  position: relative;
  z-index: 1;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  margin-bottom: 50px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px var(--shadow));
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand-title {
  font-family: "PP Editorial New Ultralight", serif;
  font-size: 42px;
  font-weight: 200;
  color: var(--text-color);
  letter-spacing: 0.5px;
  line-height: 1;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: center;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  letter-spacing: 0.3px;
}

.icon-btn.secondary {
  color: var(--muted);
  font-weight: 400;
}

.icon-btn:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px var(--shadow);
}

.theme-toggle {
  background: var(--input-bg);
  color: var(--accent-color);
  padding: 10px;
  min-width: 44px;
  justify-content: center;
}

.theme-toggle .material-symbols-outlined {
  font-size: 22px;
}

.search {
  display: flex;
  gap: 12px;
  margin: 30px 0 40px;
  align-items: center;
}

.search input {
  flex: 1;
  padding: 16px 20px;
  background: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--border-color);
  font-size: 15px;
  font-weight: 400;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.search input::placeholder {
  color: var(--muted);
  opacity: 0.7;
  font-style: italic;
}

.search input:focus {
  border-color: var(--accent-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.search select {
  padding: 16px 18px;
  background: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--border-color);
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.search select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.search select option {
  background: var(--input-bg);
  color: var(--input-text);
}

.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.breadcrumb .crumb {
  color: var(--accent-color);
  cursor: pointer;
  font-weight: 600;
  transition: color 0.2s ease;
}

.breadcrumb .crumb:hover {
  color: var(--accent-light);
}

.sep {
  color: var(--muted);
  opacity: 0.5;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  padding: 24px;
  display: flex;
  flex-direction: column;
  min-height: 130px;
  justify-content: space-between;
  cursor: pointer;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  border-color: var(--accent-color);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px var(--shadow);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.card-icon {
  font-size: 28px;
  color: var(--accent-color);
  transition: transform 0.3s ease;
}

.card:hover .card-icon {
  transform: scale(1.1);
}

.card-title {
  font-weight: 600;
  font-size: 17px;
  line-height: 1.4;
  color: var(--text-color);
}

.card-meta {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  margin-top: 6px;
  opacity: 0.8;
}

.empty {
  margin-top: 80px;
  color: var(--muted);
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  font-family: "PP Editorial New Ultralight", serif;
  letter-spacing: 0.5px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1200;
}

.modal {
  width: 90%;
  height: 85%;
  background: var(--input-bg);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--input-bg);
}

.modal iframe {
  flex: 1;
  border: 0;
  width: 100%;
}

.footer {
  margin: 60px auto 40px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 1px;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .app {
    padding: 20px;
    margin: 20px auto;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
  }

  .brand {
    gap: 14px;
  }

  .brand-logo {
    width: 40px;
    height: 40px;
  }

  .brand-title {
    font-size: 32px;
  }

  .brand-sub {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .controls {
    width: 100%;
    justify-content: space-between;
  }

  .icon-btn {
    padding: 10px 14px;
    font-size: 13px;
  }

  .icon-btn span,
  .icon-btn i {
    font-size: 18px;
  }

  .search {
    flex-direction: column;
    gap: 12px;
    margin: 20px 0 30px;
  }

  .search input,
  .search select {
    width: 100%;
    padding: 14px 16px;
  }

  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card {
    padding: 20px;
    min-height: 110px;
  }

  .card-icon {
    font-size: 24px;
  }

  .card-title {
    font-size: 15px;
  }

  .modal {
    width: 100%;
    height: 100%;
    border-radius: 12px;
  }

  .modal header {
    padding: 16px 20px;
  }

  .breadcrumb {
    font-size: 12px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .app {
    padding: 16px;
  }

  .header {
    margin-bottom: 24px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .brand-title {
    font-size: 28px;
  }

  .brand-sub {
    font-size: 9px;
    letter-spacing: 1.5px;
  }

  .icon-btn {
    padding: 8px 12px;
    font-size: 12px;
    gap: 6px;
  }

  .icon-btn span,
  .icon-btn i {
    font-size: 16px;
  }

  .footer {
    font-size: 11px;
    margin: 40px auto 30px;
  }
}
