/* ========================================
   GalaxyStream Channels - Apple/Netflix Quality
   ======================================== */

:root {
    --background: #0b0b0b;
    --surface: #111217;
    --accent: #94DB4B;
    --primary: #8FFF00;
    --text-primary: #FFFFFF;
    --text-secondary: #A1A1AA;
    --text-muted: #71717A;
    --border: rgba(255, 255, 255, 0.1);
    --red: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 16px;
    
    /* Homepage Header Variables */
    --header-height: 72px;
    --primary-green: #8FFF00;
    --dark-bg: #0b0b0b;
    --muted-text: #a2b0c6;
    --iris-color: #7c5cff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    padding-top: var(--header-height);
}

/* ========================================
   Premium Header (Exact Copy from Homepage)
   ======================================== */

.premium-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(12, 12, 16, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
    padding-inline: max(16px, env(safe-area-inset-left));
}

.premium-header.scrolled {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
    background: rgba(12, 12, 16, 0.8);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 18px;
    z-index: 1001;
    transition: transform 200ms ease;
}

.brand-logo:hover {
    transform: scale(1.02);
}

.brand-logo img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(143, 255, 0, 0.2);
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    align-items: center;
    gap: 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-link {
    position: relative;
    color: var(--muted-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 8px 0;
    transition: color 250ms ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-green), var(--iris-color));
    transition: width 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary-green);
}

.nav-link.active::after {
    width: 100%;
}

.cta-button {
    background: linear-gradient(135deg, var(--primary-green), #9fff20);
    color: var(--dark-bg);
    padding: 12px 24px;
    border-radius: 22px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(143, 255, 0, 0.3);
    transition: all 250ms cubic-bezier(0.22, 0.61, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 600ms ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(143, 255, 0, 0.4);
}

.cta-button:hover::before {
    left: 100%;
}

/* Mobile Menu Button */
.mobile-menu-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: transform 200ms ease;
}

.mobile-menu-button:hover {
    transform: scale(1.1);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
    transform-origin: center;
}

.hamburger-line:not(:last-child) {
    margin-bottom: 4px;
}

.mobile-menu-button[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

.mobile-menu-button[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-button[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
}

/* Full-Screen Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 300ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(12, 12, 16, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0 0 22px 22px;
    padding: calc(var(--header-height) + 32px) 24px 40px;
    transform: translateY(-100%);
    transition: transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.mobile-menu-overlay.active .mobile-menu-panel {
    transform: translateY(0);
}

.mobile-menu-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-brand img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.mobile-menu-brand span {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-menu-links {
    list-style: none;
    margin-bottom: 40px;
}

.mobile-menu-links li {
    opacity: 0;
    transform: translateX(-20px);
    animation: slideInStagger 400ms cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.mobile-menu-overlay.active .mobile-menu-links li:nth-child(1) { animation-delay: 100ms; }
.mobile-menu-overlay.active .mobile-menu-links li:nth-child(2) { animation-delay: 150ms; }
.mobile-menu-overlay.active .mobile-menu-links li:nth-child(3) { animation-delay: 200ms; }
.mobile-menu-overlay.active .mobile-menu-links li:nth-child(4) { animation-delay: 250ms; }
.mobile-menu-overlay.active .mobile-menu-links li:nth-child(5) { animation-delay: 300ms; }
.mobile-menu-overlay.active .mobile-menu-links li:nth-child(6) { animation-delay: 350ms; }

@keyframes slideInStagger {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 250ms ease;
}

.mobile-menu-link:hover {
    color: var(--primary-green);
    padding-left: 8px;
}

.mobile-menu-link::after {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: all 250ms ease;
    color: var(--iris-color);
}

.mobile-menu-link:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu-link.active {
    color: var(--primary-green);
}

.mobile-menu-cta {
    background: linear-gradient(135deg, var(--primary-green), #9fff20);
    color: var(--dark-bg);
    padding: 16px 24px;
    border-radius: 18px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    display: block;
    margin-bottom: 32px;
    box-shadow: 0 6px 24px rgba(143, 255, 0, 0.3);
    transition: all 250ms ease;
}

.mobile-menu-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(143, 255, 0, 0.4);
}

.mobile-menu-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-support-links {
    display: flex;
    gap: 20px;
}

.support-link {
    color: var(--muted-text);
    text-decoration: none;
    font-size: 14px;
    transition: color 250ms ease;
}

.support-link:hover {
    color: var(--primary-green);
}

/* Responsive Breakpoints */
@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
    }
    
    .mobile-menu-button {
        display: none;
    }
}

@media (max-width: 1023px) {
    .mobile-menu-button {
        display: flex;
    }
}

/* ========================================
   Loading Screen
   ======================================== */

.loading-screen {
    position: fixed;
    inset: 0;
    background-color: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.loading-content {
    text-align: center;
}

.loading-logo img {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    box-shadow: 0 8px 25px rgba(148, 219, 75, 0.3);
    margin-bottom: 2rem;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 2rem;
    border: 3px solid var(--surface);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-content p {
    color: var(--text-secondary);
    font-size: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   Error Screen
   ======================================== */

.error-screen {
    position: fixed;
    inset: 0;
    background-color: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.error-content {
    text-align: center;
    max-width: 400px;
    padding: 2rem;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.error-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 0.5rem;
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.retry-btn {
    padding: 0.75rem 2rem;
    background: var(--accent);
    color: var(--background);
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.retry-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* ========================================
   Main App Layout
   ======================================== */

.app {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 1rem;
    min-height: calc(100vh - var(--header-height));
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 3rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(148, 219, 75, 0.1);
    background: rgba(17, 18, 23, 0.8);
}

.clear-btn {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.clear-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

.clear-btn svg {
    width: 1rem;
    height: 1rem;
}

/* ========================================
   Tab Bar
   ======================================== */

.tab-bar {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
    padding: 0.5rem;
    background: var(--surface);
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: var(--accent);
    color: var(--background);
    box-shadow: 0 4px 12px rgba(148, 219, 75, 0.25);
}

.tab-icon {
    width: 1rem;
    height: 1rem;
}

/* ========================================
   Breadcrumb Navigation
   ======================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--accent);
    border: none;
    border-radius: 0.5rem;
    color: var(--background);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.back-btn:hover {
    background: var(--primary);
    transform: translateY(-1px);
}

.back-btn svg {
    width: 1rem;
    height: 1rem;
}

.breadcrumb-path {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ========================================
   Content Layout
   ======================================== */

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.view-container {
    display: none;
}

.view-container.active {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.view-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.count-badge {
    background: var(--accent);
    color: var(--background);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ========================================
   Content Grid
   ======================================== */

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.grid-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.4s ease forwards;
}

.grid-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 30px rgba(148, 219, 75, 0.15);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.card-badge {
    padding: 0.125rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-count {
    background: rgba(148, 219, 75, 0.2);
    color: var(--accent);
}

.badge-quality {
    background: rgba(143, 255, 0, 0.2);
    color: var(--primary);
}

.card-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.4;
}

/* ========================================
   Lists
   ======================================== */

.channels-list,
.titles-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 60vh;
    overflow-y: auto;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: background-color 0.2s ease;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item:hover {
    background: rgba(17, 18, 23, 0.5);
}

.item-main {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.item-tag {
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.tag-hd {
    background: rgba(143, 255, 0, 0.2);
    color: var(--primary);
}

.tag-4k {
    background: rgba(148, 219, 75, 0.2);
    color: var(--accent);
}

/* ========================================
   Search Results
   ======================================== */

.search-results {
    animation: fadeInUp 0.3s ease;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.search-group-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-count {
    background: var(--accent);
    color: var(--background);
    padding: 0.125rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.search-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.5rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.search-item:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

.search-highlight {
    background: var(--accent);
    color: var(--background);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* ========================================
   Empty States
   ======================================== */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    animation: fadeInUp 0.3s ease;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.clear-search-btn {
    padding: 0.75rem 2rem;
    background: var(--accent);
    color: var(--background);
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* ========================================
   Toast Notification
   ======================================== */

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 300;
    background: rgba(17, 18, 23, 0.9);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    transform: translateY(100px);
    opacity: 0;
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staggered animations */
.grid-card:nth-child(1) { animation-delay: 0.1s; }
.grid-card:nth-child(2) { animation-delay: 0.15s; }
.grid-card:nth-child(3) { animation-delay: 0.2s; }
.grid-card:nth-child(4) { animation-delay: 0.25s; }
.grid-card:nth-child(5) { animation-delay: 0.3s; }
.grid-card:nth-child(6) { animation-delay: 0.35s; }

.list-item:nth-child(1) { animation-delay: 0.05s; }
.list-item:nth-child(2) { animation-delay: 0.1s; }
.list-item:nth-child(3) { animation-delay: 0.15s; }
.list-item:nth-child(4) { animation-delay: 0.2s; }
.list-item:nth-child(5) { animation-delay: 0.25s; }

/* ========================================
   Custom Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .app {
        padding: 1rem;
    }

    .page-title h1 {
        font-size: 2rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .grid-card {
        padding: 1rem;
    }

    .tab-bar {
        flex-direction: column;
        gap: 0.25rem;
    }

    .tab-btn {
        justify-content: center;
        padding: 0.75rem;
    }

    .breadcrumb {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

@media (max-width: 480px) {
    .search-input {
        padding: 0.875rem 2.5rem 0.875rem 2.5rem;
        font-size: 0.875rem;
    }

    .view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ========================================
   Accessibility & Reduced Motion
   ======================================== */

.focus-visible:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ========================================
   Utility Classes
   ======================================== */

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
} 