/* Minecraftia pixel font */
@font-face {
  font-family: 'Minecraftia';
  src: url('https://ccvaults.com/static/fonts/Minecraftia-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Minecraftia', 'Courier New', monospace;
  background: #000;
  color: #fff;
  min-height: 100vh;
  image-rendering: pixelated;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Announcement Bar */
.announcement-bar {
  background: #0a1a2a;
  border: 1px solid #00e5ff33;
  margin: 0 1rem;
  padding: 10px 16px;
  text-align: center;
  font-size: 12px;
  color: #c7c7c8;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}
.announcement-close {
  background: none;
  border: none;
  color: #999;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

/* App Wrapper */
.app-wrapper {
  max-width: 72rem;
  margin: 0 auto;
  overflow-x: hidden;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

/* Header */
.app-header {
  padding-top: 1rem;
}
.logo-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}
.logo-text {
  font-size: 48px;
  font-weight: bold;
  color: #fff;
  letter-spacing: 2px;
}
.logo-img {
  height: 48px;
  max-width: 360px;
  width: auto;
  display: block;
  object-fit: contain;
}
.logo-sub {
  font-size: 18px;
  color: #00e5ff;
  letter-spacing: 6px;
  text-transform: lowercase;
}

/* Tabs - Navigation Bar */
.main-tabs {
  display: flex;
  align-items: center;
  background: #111;
  border: 1px solid #333;
  padding: 0.5rem 0;
  margin: 0 auto 1rem;
  width: 100%;
  max-width: 100%;
  justify-content: center;
  overflow-x: auto;
}
.tabs-nav {
  display: flex;
  gap: 0;
  white-space: nowrap;
  flex-wrap: nowrap;
  width: 100%;
  justify-content: center;
}
.tab-button {
  color: #c7c7c8;
  background: transparent;
  border: none;
  white-space: nowrap;
  cursor: pointer;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
  text-decoration: none;
  flex: 1;
  text-align: center;
}
.tab-button:hover:not(:disabled) {
  color: #fff;
}
.tab-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.active-tab {
  color: #00e5ff;
}

/* Main Content */
.main-content {
  display: flex;
  flex-direction: row;
  gap: 0;
  flex-grow: 1;
}

/* Mobile Toggle */
.mc-mobile-toggle {
  display: none;
  background: #272727;
  border: 1px solid #333;
  color: #c7c7c8;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  width: 100%;
  margin-bottom: 0.5rem;
}

/* Sidebar */
.sidebar {
  width: 16rem;
  min-width: 16rem;
  max-width: 16rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 1rem;
  align-self: flex-start;
  border-right: 2px solid #333;
  padding: 12px;
}
.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mc-sidebar-item {
  display: flex;
  align-items: center;
  background: #272727;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-left: 4px solid transparent;
}
.mc-sidebar-item:hover {
  background: #1a2d3d;
}
.mc-sidebar-active {
  border-left: 4px solid #00e5ff;
  background: #1a2d3d;
}
.mc-sidebar-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  flex-shrink: 0;
  transition: color 0.15s ease;
  color: #999;
}
.mc-sidebar-active .mc-sidebar-icon {
  color: #00e5ff;
}
.mc-sidebar-text {
  font-size: 13.6px;
  color: #c7c7c8;
  flex-grow: 1;
}
.mc-sidebar-active .mc-sidebar-text {
  color: #00e5ff;
}
.mc-sidebar-count {
  font-size: 12px;
  color: #666;
  margin-left: auto;
  padding-left: 8px;
}
.mc-sidebar-active .mc-sidebar-count {
  color: #7adfff;
}

/* Content Area */
.content-area {
  flex: 1;
  min-width: 0;
  padding-left: 0;
}

/* Search */
.mc-search-container {
  position: relative;
  margin-bottom: 0;
}
.mc-search-input {
  width: 100%;
  height: 60px;
  background: #1e1e1e;
  border: 2px solid #333;
  padding: 8px 48px 8px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease;
}
.mc-search-input:focus {
  border-color: #00e5ff;
}
.mc-search-input::placeholder {
  color: #555;
}
.search-clear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.search-clear:hover {
  color: #fff;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}
.modal-content {
  background: #1e1e1e;
  border: 2px solid #444;
  width: 520px;
  max-width: 90vw;
  padding: 24px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}
.modal-close:hover {
  color: #00e5ff;
}
.modal-preview {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1a1a1a;
  background-image:
    linear-gradient(45deg, #222 25%, transparent 25%),
    linear-gradient(-45deg, #222 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #222 75%),
    linear-gradient(-45deg, transparent 75%, #222 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  margin-bottom: 16px;
}
.modal-image {
  max-width: 80%;
  max-height: 80%;
  image-rendering: pixelated;
}
.modal-name {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 12px;
}
.modal-tags {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.modal-tag {
  background: #2a4a5a;
  color: #7adfff;
  padding: 4px 14px;
  font-size: 12px;
  border-radius: 12px;
}
.modal-download {
  width: 100%;
  padding: 12px;
  background: #1a3a4a;
  border: 2px solid #00e5ff;
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.15s ease;
}
.modal-download:hover {
  background: #00e5ff;
  color: #000;
}

.modal-with-sounds {
  max-height: 85vh;
  overflow-y: auto;
}
.modal-name-sub {
  font-size: 12px;
  color: #666;
  text-align: center;
  margin-top: -8px;
  margin-bottom: 12px;
}
.modal-sounds {
  margin-top: 16px;
  border-top: 1px solid #333;
  padding-top: 12px;
}
.modal-sounds-title {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #00e5ff;
}
.modal-sounds-count {
  font-size: 11px;
  font-weight: normal;
  color: #666;
}
.sound-event {
  margin-bottom: 10px;
  background: #151515;
  border: 1px solid #2b2b2b;
  padding: 8px;
}
.sound-event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.sound-event-header:hover {
  background: #1a2d3d;
}
.sound-event-name {
  font-size: 12px;
  color: #ddd;
}
.sound-event-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sound-file-count {
  font-size: 10px;
  color: #666;
}
.sound-event-code {
  font-size: 10px;
  color: #666;
  background: #1a1a1a;
  padding: 2px 6px;
}
.sound-expand-icon {
  font-size: 12px;
  color: #00e5ff;
  width: 14px;
  text-align: center;
}
.sound-files {
  padding-top: 8px;
}
.sound-file {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 0;
  font-size: 11px;
  color: #999;
}
.sound-file audio {
  width: 100%;
  height: 32px;
}
.sound-file-path {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Subcategory Tabs */
.subcategory-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
  border-bottom: 2px solid #222;
  margin-bottom: 0;
}
.subcat-tab {
  background: transparent;
  border: 2px solid #333;
  color: #c7c7c8;
  font-family: inherit;
  font-size: 12px;
  padding: 6px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.subcat-tab:hover {
  background: #1a2d44;
  border-color: #00e5ff;
  color: #fff;
}
.subcat-tab-active {
  background: #00e5ff;
  color: #000;
  font-weight: 700;
  border-color: #00e5ff;
}
.subcat-tab-active:hover {
  background: #4de8ff;
  color: #000;
}
.subcat-count {
  margin-left: 4px;
}

/* Icons Grid */
.mc-icons-grid {
  display: grid;
  gap: 0;
}
.mc-grid-standard {
  grid-template-columns: repeat(12, 1fr);
}
.mc-icon-item {
  aspect-ratio: 1;
  background: #191919;
  border: 2px solid #2b2b2b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 15%;
  position: relative;
}
.mc-icon-item:hover {
  background: #1a2d44;
  transform: scale(1.08);
  border-color: #00e5ff;
  z-index: 1;
}
.mc-icon-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

/* Pagination */
.mc-pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}
.mc-page-button {
  background: #434343;
  color: #fff;
  border: 1px solid #a3a3a3;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  min-width: 36px;
  text-align: center;
  transition: all 0.15s ease;
}
.mc-page-button:hover:not(:disabled):not(.mc-page-active) {
  background: #555;
}
.mc-page-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.mc-page-active {
  background: #4de8ff;
  color: #000;
  font-weight: 700;
  border-color: #4de8ff;
}
.mc-page-nav {
  font-weight: bold;
}
.mc-page-ellipsis {
  display: flex;
  align-items: center;
  padding: 0 4px;
  color: #666;
  font-size: 12px;
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 2rem 1rem;
  border-top: 1px solid #222;
  margin-top: 2rem;
}
.footer-text {
  font-size: 11px;
  color: #666;
  margin-bottom: 0.5rem;
}
.footer-note {
  font-size: 10px;
  color: #444;
}

/* Responsive */
@media (max-width: 767px) {
  .main-tabs {
    padding: 0;
  }
  .tab-button {
    padding: 0.5rem 0.25rem;
    font-size: 12px;
  }
  .main-content {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    position: static;
    display: none;
    border-right: none;
    border-bottom: 2px solid #333;
  }
  .sidebar.sidebar-open {
    display: flex;
  }
  .mc-mobile-toggle {
    display: block;
  }
  .mc-grid-standard {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }
  .logo-area {
    margin-top: 1rem;
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .mc-grid-standard {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .mc-grid-standard {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.mc-icon-item {
  animation: fadeIn 0.15s ease;
}

/* ---- Footer ---- */
.site-footer {
  text-align: center;
  padding: 20px 0 12px;
  color: #95a0b8;
  font-size: 13px;
}
.site-footer a {
  color: #95a0b8;
  text-decoration: none;
  transition: color 0.15s;
}
.site-footer a:hover {
  color: #4fd1ff;
}
