/* ============================================
   AD-X LIVE - UNIFIED PLATFORM STYLES
   Premium Glassmorphism Dark Theme
   ============================================ */

:root {
    /* Core Colors */
    --bg-primary: #0a0a0b;
    --bg-card: #111113;
    --bg-elevated: #1a1a1d;
    --bg-glass: rgba(20, 20, 22, 0.85);

    /* Text */
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --text-muted: #48484a;

    /* Accents */
    --accent-gold: #fbbf24;
    --accent-orange: #f97316;
    --accent-green: #10b981;
    --accent-blue: #0a84ff;
    --accent-purple: #8b5cf6;
    --accent-red: #ef4444;
    --accent-pink: #ec4899;

    /* Platform Colors */
    --instagram: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    --youtube: #ff0000;
    --linkedin: #0077b5;
    --twitter: #1da1f2;

    /* Borders & Effects */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.12);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(251, 191, 36, 0.1);

    /* Sidebar */
    --sidebar-width: 240px;
    --sidebar-collapsed: 8px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ============ TYPOGRAPHY ============ */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.25rem;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============ GLASSMORPHISM CARDS ============ */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    transition: all var(--transition-normal);
}

.glass-card:hover {
    background: rgba(30, 30, 32, 0.9);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

/* ============ HEADER ============ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(10, 10, 11, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 200;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo .accent {
    color: var(--accent-gold);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-nav a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.header-nav a:hover {
    color: var(--text-primary);
}

/* ============ SIDEBAR ============ */
.sidebar-trigger {
    position: fixed;
    left: 0;
    top: 64px;
    width: var(--sidebar-collapsed);
    height: calc(100vh - 64px);
    z-index: 150;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.2), transparent);
}

.sidebar {
    position: fixed;
    left: calc(-1 * var(--sidebar-width) + var(--sidebar-collapsed));
    top: 64px;
    width: var(--sidebar-width);
    height: calc(100vh - 64px);
    background: rgba(17, 17, 19, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    z-index: 160;
    transition: left var(--transition-normal);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    overflow-y: auto;
}

.sidebar:hover,
.sidebar.active,
.sidebar-trigger:hover+.sidebar {
    left: 0;
}

.sidebar-section {
    padding: 0 16px;
    margin-bottom: 24px;
}

.sidebar-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0 12px;
    margin-bottom: 12px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent-gold);
}

.sidebar-item .icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-item .count {
    margin-left: auto;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 8px;
    border-radius: 100px;
}

.sidebar-hint {
    margin-top: auto;
    padding: 16px 24px;
    font-size: 0.6875rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
}

/* ============ MAIN CONTENT ============ */
.main-wrapper {
    margin-top: 64px;
    padding-left: var(--sidebar-collapsed);
    min-height: calc(100vh - 64px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px;
}

/* ============ PAGE HEADER ============ */
.page-header {
    margin-bottom: 48px;
}

.page-header h1 {
    margin-bottom: 8px;
}

.page-header .subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
}

/* ============ SECTION TILES ============ */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.tile {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    display: block;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--tile-accent, var(--accent-gold));
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.tile:hover {
    background: var(--bg-elevated);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.tile:hover::before {
    opacity: 1;
}

.tile-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 20px;
    background: var(--tile-accent, var(--accent-gold));
    opacity: 0.9;
}

.tile h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.tile p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.tile-meta {
    display: flex;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.tile-stat {
    text-align: left;
}

.tile-stat .value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.tile-stat .label {
    font-size: 0.6875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============ PLATFORM ICONS ============ */
.platform-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-icon.ig {
    background: var(--instagram);
}

.platform-icon.yt {
    background: var(--youtube);
}

.platform-icon.li {
    background: var(--linkedin);
}

.platform-icon.tw {
    background: var(--twitter);
}

.platform-icon svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* ============ PLATFORM TAB CONTENT ============ */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.platform-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.platform-header .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.platform-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.platform-header .count-badge {
    background: rgba(251, 191, 36, 0.12);
    color: var(--accent-gold);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* ============ SCRIPT CARDS ============ */
.day-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
}

.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.day-title {
    font-size: 0.9375rem;
    font-weight: 600;
}

.day-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.script {
    background: var(--bg-elevated);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.script-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-gold);
    margin-bottom: 10px;
}

.hook {
    padding: 12px 16px;
    background: rgba(251, 191, 36, 0.08);
    border-left: 3px solid var(--accent-gold);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 12px;
}

.body-text {
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    font-size: 0.8125rem;
    white-space: pre-wrap;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 12px;
}

.cta {
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.08);
    border-left: 3px solid var(--accent-green);
    border-radius: 8px;
    font-size: 0.8125rem;
}

/* ============ NAVIGATION LINKS ============ */
.nav-links {
    display: flex;
    justify-content: space-between;
    padding: 24px 0;
    margin-top: 32px;
    border-top: 1px solid var(--border);
}

.nav-link {
    color: var(--accent-gold);
    font-size: 0.875rem;
    padding: 12px 24px;
    background: var(--bg-elevated);
    border-radius: 100px;
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    background: var(--bg-card);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .header {
        padding: 0 16px;
    }

    .container {
        padding: 24px 16px;
    }

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

    .sidebar {
        left: calc(-1 * var(--sidebar-width));
    }

    .main-wrapper {
        padding-left: 0;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }
}

/* ============ UTILITY CLASSES ============ */
.text-gold {
    color: var(--accent-gold);
}

.text-green {
    color: var(--accent-green);
}

.text-blue {
    color: var(--accent-blue);
}

.text-purple {
    color: var(--accent-purple);
}

.text-muted {
    color: var(--text-secondary);
}

.bg-gold {
    background: var(--accent-gold);
}

.bg-green {
    background: var(--accent-green);
}

.bg-blue {
    background: var(--accent-blue);
}

.bg-purple {
    background: var(--accent-purple);
}

.bg-red {
    background: var(--accent-red);
}

.bg-orange {
    background: var(--accent-orange);
}

.bg-pink {
    background: var(--accent-pink);
}

.bg-ig {
    background: var(--instagram);
}

.bg-yt {
    background: var(--youtube);
}

.bg-li {
    background: var(--linkedin);
}

.bg-tw {
    background: var(--twitter);
}