/* ========================================
   Easy MoBile Tools - Developer Console
   Professional CSS Design System
   ======================================== */

/* CSS Variables / Design Tokens */
:root {
    /* Primary Colors */
    --primary: #1a73e8;
    --primary-dark: #1557b0;
    --primary-light: #4285f4;
    --primary-surface: rgba(26, 115, 232, 0.08);
    --primary-surface-hover: rgba(26, 115, 232, 0.14);

    /* Accent Colors */
    --accent: #00c853;
    --accent-dark: #009624;
    --accent-light: #5efc82;

    /* Semantic Colors */
    --success: #0f9d58;
    --warning: #f4b400;
    --error: #ea4335;
    --info: #4285f4;

    /* Neutrals */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f4;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --surface-variant: #e8eaed;
    --border: #dadce0;
    --border-light: #e8eaed;

    /* Text Colors */
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-tertiary: #80868b;
    --text-on-primary: #ffffff;
    --text-link: #1a73e8;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(60, 64, 67, 0.08), 0 1px 2px rgba(60, 64, 67, 0.06);
    --shadow-md: 0 4px 6px rgba(60, 64, 67, 0.1), 0 1px 3px rgba(60, 64, 67, 0.08);
    --shadow-lg: 0 8px 24px rgba(60, 64, 67, 0.12), 0 2px 8px rgba(60, 64, 67, 0.08);
    --shadow-xl: 0 16px 48px rgba(60, 64, 67, 0.15), 0 4px 12px rgba(60, 64, 67, 0.1);
    --shadow-glow: 0 0 20px rgba(26, 115, 232, 0.3);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-primary: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Inter', sans-serif;

    /* Z-Index */
    --z-nav: 100;
    --z-modal: 1000;
    --z-toast: 1100;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --bg-elevated: #1e2a4a;
    --surface: #1e2a4a;
    --surface-variant: #2a3a5c;
    --border: #2a3a5c;
    --border-light: #1e2a4a;
    --text-primary: #e8eaed;
    --text-secondary: #bdc1c6;
    --text-tertiary: #9aa0a6;
    --text-link: #8ab4f8;
    --primary-surface: rgba(138, 180, 248, 0.1);
    --primary-surface-hover: rgba(138, 180, 248, 0.18);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
}

/* ========================================
   Global Reset & Base
   ======================================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Navigation Bar
   ======================================== */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-nav);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition-normal);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.top-nav.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-auth-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.nav-auth-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    transition: all var(--transition-fast);
}

.nav-auth-primary {
    background: var(--primary);
    color: white;
}

.nav-auth-primary:hover {
    background: var(--primary-dark);
    color: white;
}

.nav-auth-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-auth-secondary:hover {
    background: var(--primary-surface);
    color: var(--primary);
}

.user-menu-wrap {
    position: relative;
}

.user-menu-btn {
    border: none;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: 240px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 12px;
    display: none;
}

.user-dropdown.active {
    display: block;
    animation: slideDown 0.2s ease;
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 14px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 8px;
}

.user-dropdown-header strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.user-dropdown-header p {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.user-avatar-large {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.user-dropdown-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.user-dropdown-link:hover {
    background: var(--primary-surface);
    color: var(--primary);
}

.user-dropdown-button {
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-primary);
}

/* Search Bar */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    padding: 0 var(--space-md);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
    width: 280px;
}

.search-bar:focus-within {
    background: var(--bg-secondary);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
    width: 340px;
}

.search-icon {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    margin-right: var(--space-sm);
}

.search-bar input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    padding: 10px 0;
    width: 100%;
    font-family: var(--font-primary);
}

.search-bar input::placeholder {
    color: var(--text-tertiary);
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
    display: none;
    overflow: hidden;
    z-index: 10;
}

.search-results.active {
    display: block;
    animation: slideDown 0.2s ease;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--primary-surface);
}

.search-result-item img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
}

.search-result-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.search-result-info span {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Nav Buttons */
.nav-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.nav-btn:hover {
    background: var(--primary-surface);
    color: var(--primary);
    transform: scale(1.05);
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    position: relative;
    padding: 100px 24px 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    overflow: hidden;
    text-align: center;
}

[data-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.hero-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.06) 0%, transparent 40%);
    animation: floatPattern 20s ease-in-out infinite;
}

@keyframes floatPattern {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.02);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: var(--space-lg);
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    animation: fadeInUp 0.6s ease 0.1s both;
}

.gradient-text {
    background: linear-gradient(135deg, #ffd54f, #ffb300);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
    margin-bottom: var(--space-2xl);
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
    animation: fadeInUp 0.6s ease 0.3s both;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-normal);
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-cta:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hero-cta i {
    animation: bounceDown 2s ease-in-out infinite;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
}

.hero-cta-solid {
    background: white;
    color: var(--primary);
    border-color: white;
}

.hero-cta-solid:hover {
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.92);
}

.hero-auth-panel {
    max-width: 760px;
    margin: 0 auto;
    padding: 18px 22px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: white;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.hero-auth-panel h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.hero-auth-panel p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.92rem;
}

.hero-feature-chips {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 14px;
}

.hero-feature-chips span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.82rem;
    font-weight: 600;
}

@keyframes bounceDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

/* ========================================
   Filter Section
   ======================================== */
.filter-section {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) var(--space-lg);
    position: sticky;
    top: 64px;
    z-index: 50;
    transition: background-color var(--transition-normal);
}

.filter-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.filter-tabs {
    display: flex;
    gap: var(--space-sm);
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
}

.filter-tab:hover {
    background: var(--primary-surface);
    color: var(--primary);
}

.filter-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.sort-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.sort-select {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
}

.sort-select:focus {
    border-color: var(--primary);
}

/* ========================================
   Apps Grid
   ======================================== */
.apps-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-lg);
    min-height: 400px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
}

/* App Card */
.app-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
}

.app-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.app-card-header {
    position: relative;
    padding: var(--space-lg) var(--space-lg) 0;
    display: flex;
    gap: var(--space-md);
}

.app-card-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.app-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-card-info {
    flex: 1;
    min-width: 0;
}

.app-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-card-developer {
    font-size: 0.8rem;
    color: var(--text-link);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.app-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.app-card-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.app-card-rating i {
    color: var(--warning);
    font-size: 0.75rem;
}

.app-card-downloads {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.app-card-category {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.app-card-body {
    padding: var(--space-md) var(--space-lg);
}

.app-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-card-footer {
    padding: var(--space-md) var(--space-lg) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.app-card-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-available {
    color: var(--success);
}

.status-available .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-unavailable {
    color: var(--warning);
}

.status-unavailable .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.app-card-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
}

.btn-playstore {
    background: var(--success);
    color: white;
}

.btn-playstore:hover {
    background: var(--accent-dark);
    box-shadow: 0 4px 12px rgba(15, 157, 88, 0.3);
}

.btn-download {
    background: var(--primary);
    color: white;
}

.btn-download:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.app-card-name-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    justify-content: space-between;
}

.app-card-version {
    padding: 2px 8px;
    background: var(--primary-surface);
    color: var(--primary);
    font-size: 0.68rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
    margin-top: 2px;
}

/* ========================================
   Modal Styles
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: var(--z-modal);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    max-width: 900px;
    width: 100%;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
    margin-bottom: 40px;
}

.admin-panel-modal {
    max-width: 700px;
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--error);
    color: white;
}

/* App Detail Modal Content */
.app-detail-header {
    padding: var(--space-xl) var(--space-xl) 0;
    display: flex;
    gap: var(--space-xl);
    align-items: flex-start;
}

.app-detail-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-lg);
}

.app-detail-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-detail-info {
    flex: 1;
}

.app-detail-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.app-detail-dev {
    font-size: 0.9rem;
    color: var(--text-link);
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.app-detail-meta-row {
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.detail-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-meta-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-meta-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-detail-actions {
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
    background: transparent;
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--primary-surface);
    border-color: var(--primary);
    color: var(--primary);
}

/* Screenshots Carousel */
.screenshots-section {
    padding: 0 var(--space-xl);
    margin-bottom: var(--space-xl);
}

.screenshots-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.screenshots-scroll {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    padding-bottom: var(--space-md);
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.screenshots-scroll::-webkit-scrollbar {
    height: 6px;
}

.screenshots-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: var(--radius-full);
}

.screenshot-item {
    flex-shrink: 0;
    width: 200px;
    height: 350px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    scroll-snap-align: start;
    transition: transform var(--transition-fast);
    cursor: pointer;
}

.screenshot-item:hover {
    transform: scale(1.03);
}

.screenshot-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Description Section */
.description-section {
    padding: 0 var(--space-xl);
    margin-bottom: var(--space-xl);
}

.description-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.description-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-line;
}

.description-text.collapsed {
    max-height: 120px;
    overflow: hidden;
    position: relative;
}

.description-text.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(transparent, var(--bg-secondary));
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--text-link);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: var(--space-sm);
    font-family: var(--font-primary);
}

/* Version History */
.versions-section {
    padding: 0 var(--space-xl) var(--space-xl);
}

.versions-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.version-timeline {
    position: relative;
    padding-left: 24px;
}

.version-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-light), var(--border));
    border-radius: 1px;
}

.version-item {
    position: relative;
    margin-bottom: var(--space-lg);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    transition: all var(--transition-fast);
}

.version-item:hover {
    border-color: var(--primary);
    background: var(--primary-surface);
}

.version-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

.version-item:first-child::before {
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.2);
}

.version-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.version-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.version-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-latest {
    background: rgba(0, 200, 83, 0.15);
    color: var(--success);
}

.badge-code {
    background: var(--primary-surface);
    color: var(--primary);
}

.version-meta {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.version-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.version-changelog {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-line;
}

.version-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: var(--space-md);
    padding: 8px 18px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
}

.version-download-btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.version-download-btn.disabled {
    background: var(--surface-variant);
    color: var(--text-tertiary);
    cursor: not-allowed;
}

/* Data Safety Section */
.data-safety-section {
    padding: 0 var(--space-xl);
    margin-bottom: var(--space-xl);
}

.data-safety-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.safety-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.safety-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.safety-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.safety-icon.green {
    background: rgba(15, 157, 88, 0.12);
    color: var(--success);
}

.safety-icon.blue {
    background: rgba(26, 115, 232, 0.12);
    color: var(--primary);
}

.safety-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.safety-info p {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ========================================
   Admin Panel Styles
   ======================================== */
.admin-panel {
    padding: var(--space-xl);
}

.admin-header {
    margin-bottom: var(--space-xl);
}

.admin-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.admin-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.login-form {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.login-form h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-md);
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.admin-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border-light);
}

.admin-section:last-child {
    border-bottom: none;
}

.admin-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.file-drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-tertiary);
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-surface);
    color: var(--primary);
}

.file-drop-zone i {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    display: block;
}

.file-drop-zone p {
    font-size: 0.85rem;
    font-weight: 500;
}

.file-drop-zone span {
    font-size: 0.75rem;
}

.file-info {
    margin-top: var(--space-sm);
    padding: var(--space-md);
    background: var(--primary-surface);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-upload {
    width: 100%;
    justify-content: center;
    margin-top: var(--space-md);
    padding: 14px;
    font-size: 1rem;
}

.upload-history {
    max-height: 300px;
    overflow-y: auto;
}

.upload-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.upload-item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--primary-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.upload-item-info {
    flex: 1;
}

.upload-item-info h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.upload-item-info span {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.no-data {
    text-align: center;
    color: var(--text-tertiary);
    padding: var(--space-xl);
    font-size: 0.9rem;
}

/* ========================================
   Toast Notifications
   ======================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border-left: 4px solid;
    animation: slideInRight 0.3s ease;
    min-width: 300px;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast.info {
    border-left-color: var(--info);
}

.toast-icon {
    font-size: 1.2rem;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast.info .toast-icon {
    color: var(--info);
}

.toast-message {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   Footer
   ======================================== */
.footer {
    position: relative;
    background: var(--text-primary);
    color: var(--bg-primary);
    padding-top: 0;
}

[data-theme="dark"] .footer {
    background: #0f0f1a;
}

.footer-wave {
    position: relative;
    margin-top: var(--space-3xl);
}

.footer-wave svg {
    display: block;
    width: 100%;
    height: 80px;
}

.footer-wave svg path {
    fill: var(--text-primary);
}

[data-theme="dark"] .footer-wave svg path {
    fill: #0f0f1a;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg) var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.footer-brand p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: var(--space-md);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-md);
}

.footer-logo i {
    color: var(--primary-light);
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-fast);
    font-size: 1rem;
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-md);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: white;
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-dev {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
}

/* ========================================
   Back to Top
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
}

/* ========================================
   Loading Spinner
   ======================================== */
.loading-spinner {
    display: none;
    text-align: center;
    padding: var(--space-3xl);
}

.loading-spinner.active {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto var(--space-md);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card entrance animation */
.app-card {
    animation: fadeInUp 0.5s ease both;
}

.app-card:nth-child(1) {
    animation-delay: 0.1s;
}

.app-card:nth-child(2) {
    animation-delay: 0.2s;
}

.app-card:nth-child(3) {
    animation-delay: 0.3s;
}

.app-card:nth-child(4) {
    animation-delay: 0.4s;
}

.app-card:nth-child(5) {
    animation-delay: 0.5s;
}

.app-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl) var(--space-2xl);
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-section h3 {
        font-size: 0.95rem;
    }

    .sort-controls {
        gap: 8px;
    }

    .sort-select {
        padding: 8px 12px;
        font-size: 0.82rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 var(--space-md);
    }

    .nav-auth-link {
        padding: 0 12px;
        font-size: 0.78rem;
        min-height: 34px;
    }

    .search-bar {
        width: 160px;
    }

    .search-bar:focus-within {
        width: 220px;
    }

    .logo-subtitle {
        display: none;
    }

    .hero-section {
        padding: 100px 16px 50px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: var(--space-lg);
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }

    .filter-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }

    .sort-controls {
        justify-content: center;
    }

    .sort-select {
        flex: 1;
        min-width: 0;
    }

    .apps-grid {
        grid-template-columns: 1fr;
    }

    .app-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: var(--space-lg);
    }

    .app-detail-meta-row {
        justify-content: center;
    }

    .app-detail-actions {
        justify-content: center;
        padding: var(--space-md);
    }

    .screenshots-section {
        padding: 0 var(--space-md);
    }

    .description-section {
        padding: 0 var(--space-md);
    }

    .versions-section {
        padding: 0 var(--space-md) var(--space-lg);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl) var(--space-lg);
    }

    .footer-brand {
        grid-column: 1 / -1;
        text-align: center;
    }

    .footer-brand .footer-logo {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .footer-section {
        text-align: left;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }

    .footer-content {
        padding: 0 var(--space-md) var(--space-xl);
    }

    .modal-container {
        margin: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }

    .modal-overlay {
        padding: 64px 0 0;
    }

    .screenshot-item {
        width: 150px;
        height: 260px;
    }

    .newsletter-card {
        padding: 32px 20px;
    }

    .newsletter-form {
        flex-direction: column;
        max-width: 100%;
    }

    .newsletter-form input {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .top-nav {
        padding-bottom: 50px;
    }

    .nav-container {
        gap: 8px;
        height: auto;
        min-height: 60px;
        padding: 10px 16px;
        position: relative;
    }

    .nav-logo {
        flex: 1 1 auto;
        min-width: 0;
    }

    .nav-actions {
        gap: 6px;
    }

    .nav-auth-group {
        order: 1;
        gap: 6px;
    }

    .user-menu-wrap,
    .admin-btn,
    .theme-toggle {
        order: 1;
    }

    .nav-auth-link {
        min-height: 32px;
        padding: 0 12px;
        font-size: 0.75rem;
    }

    .nav-btn {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .search-bar {
        position: absolute;
        bottom: 8px;
        left: 16px;
        right: 16px;
        width: calc(100% - 32px);
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .search-bar:focus-within {
        position: absolute;
        bottom: 8px;
        width: calc(100% - 32px);
        left: 16px;
        right: 16px;
        z-index: 100;
    }

    .filter-tab span {
        display: none;
    }

    .filter-tab {
        padding: 8px 12px;
        font-size: 0.78rem;
    }

    .filter-section {
        padding: 12px 12px 0;
    }

    .sort-controls {
        width: 100%;
        flex-direction: column;
    }

    .sort-select {
        width: 100%;
        font-size: 0.82rem;
        padding: 10px 14px;
    }

    .hero-section {
        padding: 88px 16px 40px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .hero-actions {
        gap: var(--space-sm);
    }

    .hero-actions .btn {
        font-size: 0.85rem;
        padding: 12px 24px;
    }

    .app-card-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-grid {
        display: grid;
        grid-template-columns: auto auto;
        justify-content: center;
        gap: var(--space-xl) var(--space-2xl);
    }

    .footer-brand {
        grid-column: 1 / -1;
        grid-row: 1;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-section {
        display: flex;
        flex-direction: column;
    }

    /* Popular Apps - Top Left */
    .footer-section:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
        text-align: left;
        align-items: flex-start;
    }

    /* Quick Links - Right Side */
    .footer-section:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
        text-align: left;
        align-items: flex-start;
    }

    /* Legal - Bottom Center (Horizontal) */
    .footer-section:last-child {
        grid-column: 1 / -1;
        grid-row: 3;
        text-align: center;
        align-items: center;
        margin-top: 10px;
    }

    .footer-brand .footer-logo,
    .social-links {
        justify-content: center;
    }

    .footer-brand p {
        font-size: 0.82rem;
        max-width: 300px;
        margin: 0 auto 16px;
        text-align: center;
    }

    .footer-section h3 {
        font-size: 0.95rem;
        margin-bottom: var(--space-md);
    }

    .footer-links a {
        font-size: 0.82rem;
    }

    .footer-links li {
        margin-bottom: 8px;
    }

    .footer-section:last-child .footer-links {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }

    .footer-section:last-child .footer-links li {
        margin-bottom: 0;
    }

    .footer-content {
        padding: 0 16px var(--space-lg);
    }

    .footer-bottom {
        padding-top: var(--space-md);
    }

    .footer-bottom p {
        font-size: 0.75rem;
    }

    .user-dropdown {
        width: min(260px, calc(100vw - 32px));
        right: -8px;
    }

    .newsletter-card {
        padding: 24px 16px;
    }

    .newsletter-card h2 {
        font-size: 1.1rem;
    }

    .newsletter-card p {
        font-size: 0.82rem;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
    }

    .apps-main {
        padding: 0 12px;
    }

    .app-card-name {
        font-size: 0.92rem;
    }

    .app-card-version {
        font-size: 0.6rem;
        padding: 1px 6px;
    }
}

/* ========================================
   Scrollbar Styling
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ========================================
   Selection Styling
   ======================================== */
::selection {
    background: var(--primary);
    color: white;
}

/* ========================================
   ENHANCED: Glassmorphism Cards
   ======================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 28px;
    transition: all var(--transition-normal);
}

[data-theme="dark"] .glass-card {
    background: rgba(30, 42, 74, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(26, 115, 232, 0.3);
}

/* ========================================
   ENHANCED: App Card Hover Effects
   ======================================== */
.app-card {
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-card:hover::before {
    opacity: 1;
}

.app-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ========================================
   NEW: Features Section ("Why Choose Us")
   ======================================== */
.features-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: var(--primary-surface);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

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

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 20px;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(-5deg);
}

.feature-icon.purple {
    background: linear-gradient(135deg, rgba(118, 75, 162, 0.15), rgba(102, 126, 234, 0.15));
    color: #764ba2;
}

.feature-icon.blue {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.15), rgba(66, 133, 244, 0.15));
    color: #1a73e8;
}

.feature-icon.green {
    background: linear-gradient(135deg, rgba(15, 157, 88, 0.15), rgba(52, 168, 83, 0.15));
    color: #0f9d58;
}

.feature-icon.orange {
    background: linear-gradient(135deg, rgba(249, 171, 0, 0.15), rgba(251, 188, 4, 0.15));
    color: #f9ab00;
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   NEW: How It Works Section
   ======================================== */
.how-it-works {
    padding: 80px 20px;
    background: var(--bg-tertiary);
}

[data-theme="dark"] .how-it-works {
    background: var(--bg-secondary);
}

.hiw-container {
    max-width: 1000px;
    margin: 0 auto;
}

.hiw-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    position: relative;
}

.hiw-steps::before {
    content: '';
    position: absolute;
    top: 44px;
    left: 15%;
    right: 15%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #764ba2, #f093fb);
    border-radius: 2px;
    z-index: 0;
}

.hiw-step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.hiw-number {
    width: 88px;
    height: 88px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    font-weight: 800;
    background: var(--surface);
    color: var(--primary);
    border: 3px solid var(--primary);
    box-shadow: 0 8px 24px rgba(26, 115, 232, 0.15);
    transition: all 0.3s ease;
}

.hiw-step:hover .hiw-number {
    background: var(--primary);
    color: white;
    transform: scale(1.08);
}

.hiw-step h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.hiw-step p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================
   NEW: Newsletter / CTA Section
   ======================================== */
.newsletter-section {
    padding: 80px 20px;
    position: relative;
    overflow: hidden;
}

.newsletter-card {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 28px;
    padding: 48px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.newsletter-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.newsletter-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.newsletter-card h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.newsletter-card p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 460px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    outline: none;
    transition: all 0.3s ease;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input:focus {
    border-color: white;
    background: rgba(255, 255, 255, 0.25);
}

.newsletter-form button {
    padding: 14px 28px;
    background: white;
    color: #764ba2;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ========================================
   NEW: Counter Animation (IntersectionObserver)
   ======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.delay-1 {
    transition-delay: 0.1s;
}

.animate-on-scroll.delay-2 {
    transition-delay: 0.2s;
}

.animate-on-scroll.delay-3 {
    transition-delay: 0.3s;
}

.animate-on-scroll.delay-4 {
    transition-delay: 0.4s;
}

/* ========================================
   ENHANCED: Account Dashboard Styles
   ======================================== */
.account-stat-enhanced {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.account-stat-enhanced:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.account-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.account-stat-icon.heart {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.12), rgba(231, 76, 60, 0.05));
    color: #e74c3c;
}

.account-stat-icon.download {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.12), rgba(26, 115, 232, 0.05));
    color: #1a73e8;
}

.account-stat-icon.star {
    background: linear-gradient(135deg, rgba(249, 171, 0, 0.12), rgba(249, 171, 0, 0.05));
    color: #f9ab00;
}

.account-stat-icon.bell {
    background: linear-gradient(135deg, rgba(15, 157, 88, 0.12), rgba(15, 157, 88, 0.05));
    color: #0f9d58;
}

.account-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.account-stat-label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.greeting-card {
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.08), rgba(118, 75, 162, 0.08));
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 32px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.greeting-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.08), rgba(118, 75, 162, 0.08));
    border-radius: 50%;
}

.greeting-emoji {
    font-size: 2rem;
    margin-bottom: 8px;
}

.greeting-card h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.greeting-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.member-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--primary-surface);
    border-radius: var(--radius-full);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 12px;
}

.quick-actions-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.quick-action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-surface);
    transform: translateY(-2px);
}

.quick-action-btn i {
    font-size: 0.9rem;
}

/* Account settings form styles */
.settings-form {
    max-width: 500px;
}

.settings-form .form-group {
    margin-bottom: 20px;
}

.settings-form .btn-save {
    margin-top: 8px;
}

.security-info {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
}

.security-info h4 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.security-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.88rem;
}

.security-row:last-child {
    border-bottom: none;
}

.security-row span:first-child {
    color: var(--text-secondary);
}

.security-row span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

/* Activity timeline */
.activity-timeline {
    position: relative;
    padding-left: 28px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding: 14px 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--surface);
}

.timeline-item.download::before {
    background: #1a73e8;
}

.timeline-item.favorite::before {
    background: #e74c3c;
}

.timeline-item.login::before {
    background: #0f9d58;
}

.timeline-item.update::before {
    background: #f9ab00;
}

.timeline-content h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.timeline-content p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.timeline-content time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ========================================
   ENHANCED: Admin Dashboard Charts (CSS-only)
   ======================================== */
.chart-container {
    padding: 20px 0;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 200px;
    padding-bottom: 32px;
    position: relative;
}

.bar-chart::after {
    content: '';
    position: absolute;
    bottom: 28px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.bar-fill {
    width: 100%;
    max-width: 40px;
    border-radius: 8px 8px 0 0;
    background: linear-gradient(180deg, var(--primary), #764ba2);
    transition: height 1s ease;
    min-height: 4px;
}

.bar-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.bar-value {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Admin trend indicators */
.trend-up {
    color: #0f9d58;
    font-size: 0.75rem;
    font-weight: 700;
}

.trend-down {
    color: #ea4335;
    font-size: 0.75rem;
    font-weight: 700;
}

.trend-neutral {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Admin notification send form */
.notification-form {
    max-width: 600px;
}

.system-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 14px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: #0f9d58;
    box-shadow: 0 0 8px rgba(15, 157, 88, 0.5);
}

.status-dot.warning {
    background: #f9ab00;
    box-shadow: 0 0 8px rgba(249, 171, 0, 0.5);
}

.status-dot.offline {
    background: #ea4335;
    box-shadow: 0 0 8px rgba(234, 67, 53, 0.5);
}

.status-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-info span {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

/* ========================================
   NEW: Particle/Floating Dots Background
   ======================================== */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.floating-shapes span {
    position: absolute;
    display: block;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: floatShape 15s infinite linear;
}

.floating-shapes span:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 20s;
}

.floating-shapes span:nth-child(2) {
    width: 30px;
    height: 30px;
    left: 25%;
    animation-delay: 2s;
    animation-duration: 15s;
}

.floating-shapes span:nth-child(3) {
    width: 50px;
    height: 50px;
    left: 45%;
    animation-delay: 4s;
    animation-duration: 18s;
}

.floating-shapes span:nth-child(4) {
    width: 40px;
    height: 40px;
    left: 60%;
    animation-delay: 0s;
    animation-duration: 22s;
}

.floating-shapes span:nth-child(5) {
    width: 25px;
    height: 25px;
    left: 75%;
    animation-delay: 3s;
    animation-duration: 16s;
}

.floating-shapes span:nth-child(6) {
    width: 60px;
    height: 60px;
    left: 90%;
    animation-delay: 5s;
    animation-duration: 19s;
}

@keyframes floatShape {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========================================
   NEW: Pulse animation for status dots
   ======================================== */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

@keyframes bounceDown {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ========================================
   RESPONSIVE: New Sections
   ======================================== */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .hiw-steps {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .hiw-steps::before {
        display: none;
    }

    .newsletter-card {
        padding: 32px 20px;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .greeting-card {
        padding: 24px;
    }

    .greeting-card h1 {
        font-size: 1.4rem;
    }

    .quick-actions-bar {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
    }
}

/* ========================================
   REVIEWS & RATINGS
   ======================================== */
.reviews-section {
    border-top: 1px solid var(--border);
    padding-top: 28px;
    margin-top: 8px;
}

.reviews-section h2 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
}

.reviews-summary {
    margin-bottom: 20px;
}

.review-avg {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.review-avg-num {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.review-avg-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 2px;
    display: block;
}

.review-form-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 20px;
}

.review-form-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.star-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.star-btn {
    cursor: pointer;
    font-size: 1.6rem;
    color: #f4b400;
    transition: transform 0.15s ease;
    user-select: none;
}

.star-btn:hover {
    transform: scale(1.2);
}

.star-label {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-left: 8px;
    font-weight: 600;
}

.login-to-review {
    background: var(--bg-tertiary);
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
    margin-bottom: 18px;
    color: var(--text-secondary);
}

.login-to-review a {
    color: var(--primary);
    font-weight: 600;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.review-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    transition: all 0.2s ease;
}

.review-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.review-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #764ba2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.review-user strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.92rem;
}

.review-user time {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.review-rating {
    font-size: 0.9rem;
}

.review-text {
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
}

.review-admin-reply {
    margin-top: 12px;
    padding: 12px;
    background: rgba(102, 126, 234, 0.06);
    border-left: 3px solid var(--primary);
    border-radius: 0 10px 10px 0;
    font-size: 0.88rem;
}

.review-admin-reply strong {
    color: var(--primary);
    display: block;
    margin-bottom: 4px;
}

.review-admin-reply p {
    color: var(--text-secondary);
    margin: 0;
}

.review-delete-btn {
    margin-top: 10px;
    padding: 6px 14px;
    border: 1px solid #e74c3c;
    background: transparent;
    color: #e74c3c;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: all 0.2s;
}

.review-delete-btn:hover {
    background: #e74c3c;
    color: white;
}

/* ========================================
   REPORT ISSUE / COMPLAINT
   ======================================== */
.report-issue-bar {
    padding: 24px 0;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    text-align: center;
}

.report-issue-btn {
    padding: 14px 28px;
    border: 2px solid #e74c3c;
    background: transparent;
    color: #e74c3c;
    border-radius: 14px;
    font-family: var(--font-primary);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.report-issue-btn:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(231, 76, 60, 0.3);
}

.complaint-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.complaint-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.complaint-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s ease;
}

.complaint-modal-overlay.active .complaint-modal {
    transform: translateY(0) scale(1);
}

.complaint-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.complaint-modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.complaint-modal-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
}

.complaint-modal-body {
    padding: 22px;
}

.complaint-modal-body .form-group {
    margin-bottom: 14px;
}

.complaint-modal-body .form-group label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.complaint-modal-body input,
.complaint-modal-body textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-family: var(--font-primary);
    font-size: 0.92rem;
    transition: border-color 0.2s;
}

.complaint-modal-body input:focus,
.complaint-modal-body textarea:focus {
    border-color: var(--primary);
    outline: none;
}

/* ========================================
   ADMIN COMPLAINTS TABLE
   ======================================== */
.complaints-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.complaint-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    transition: all 0.2s;
}

.complaint-card:hover {
    border-color: var(--primary);
}

.complaint-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.complaint-status {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.complaint-status.pending {
    background: rgba(255, 152, 0, 0.12);
    color: #f57c00;
}

.complaint-status.in_progress {
    background: rgba(33, 150, 243, 0.12);
    color: #1976d2;
}

.complaint-status.resolved {
    background: rgba(76, 175, 80, 0.12);
    color: #388e3c;
}

.complaint-status.closed {
    background: rgba(158, 158, 158, 0.12);
    color: #757575;
}