/* ============================================
   PREMIUM MINIMAL DESIGN - CONTENTCREATE
   Theme: Premium Minimal Dark
   Version: 2.4 (Layout Fixes)
   Updated: 2026-02-08
   ============================================ */

:root {
    /* --- COLORS --- */
    /* Backgrounds */
    --bg-primary: #09090b;
    /* Main background - Near black */
    --bg-secondary: #0f0f11;
    /* Sidebar/Secondary */
    --bg-tertiary: #18181b;
    /* Hover states */
    --bg-elevated: rgba(28, 28, 30, 0.95);
    /* More opaque for dropdowns */
    /* Cards/Modals */

    /* Borders */
    --border-default: #1c1c1e;
    --border-subtle: #18181b;
    --border-hover: #27272a;
    --border-active: #3f3f46;

    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --text-muted: #52525b;
    --text-disabled: #3f3f46;

    /* Accent (Electric Lime) */
    --accent: #c8ff00;
    --accent-hover: #d4ff33;
    --accent-muted: rgba(200, 255, 0, 0.1);
    --accent-border: rgba(200, 255, 0, 0.3);

    /* Semantic */
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;

    /* Platform Colors */
    --twitter: #1DA1F2;
    --youtube: #FF0000;
    --instagram: #E4405F;
    --linkedin: #0A66C2;
    --reddit: #FF4500;

    /* --- TYPOGRAPHY --- */
    --font-primary: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

    /* --- SPACING & SIZING --- */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* --- BORDERS --- */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;

    /* --- SHADOWS --- */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --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-dropdown: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.6);

    /* --- ANIMATIONS --- */
    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.2s;

    /* Legacy Compat (To be removed) */
    --primary: var(--accent);
    --primary-dark: var(--accent-hover);
    --secondary: var(--bg-tertiary);
    --glass-bg: var(--bg-elevated);
    --glass-border: var(--border-default);
    --shadow-glow: none;
    --gradient-primary: linear-gradient(135deg, var(--accent) 0%, #a3e600 100%);
    --gradient-success: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    --gradient-accent: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-secondary: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

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

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Grain Textured Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Selection */
::selection {
    background: rgba(200, 255, 0, 0.2);
    color: #fff;
}

input,
textarea {
    font-family: var(--font-primary);
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* ============================================
   MICRO-INTERACTIONS (UI-016)
   ============================================ */
button:active,
.btn:active,
.icon-button:active {
    transform: scale(0.99);
    /* Made subtle */
}


/* ============================================
   MODAL SYSTEM
   ============================================ */
/* ============================================
   MODAL SYSTEM (UI-008)
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    padding: var(--spacing-md);
}

.modal-content {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-modal);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 700px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-enter {
    animation: modalEnter 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }

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

.modal-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    display: block;
    text-align: center;
}

.modal h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    text-align: center;
    background: none;
    -webkit-text-fill-color: initial;
}

.modal-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: var(--spacing-lg);
    line-height: 1.5;
}

/* Free Credits Banner */
.free-credits-banner {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(20, 184, 166, 0.2) 100%);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.credit-icon {
    font-size: 2.5rem;

}

.credit-info {
    display: flex;
    flex-direction: column;
}

.credit-title {
    font-weight: 600;
    color: var(--success);
    font-size: 1.1rem;
}

.credit-desc {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: var(--spacing-lg) 0;
    color: var(--text-secondary);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    padding: 0 var(--spacing-md);
    font-size: 0.85rem;
}

/* Auth Links */
.auth-links {
    display: flex;
    gap: var(--spacing-sm);
}

.auth-switch {
    text-align: center;
    margin-top: var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-switch a:hover {
    text-decoration: underline;
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.cta-button {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.secondary-btn {
    flex: 1;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.secondary-btn.accent {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
}

.secondary-btn.accent:hover {
    background: rgba(99, 102, 241, 0.3);
}

.secondary-btn.full-width {
    width: 100%;
    margin-top: var(--spacing-sm);
}

/* Guide Content */
.guide-content {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: var(--spacing-lg);
    padding-right: var(--spacing-sm);
}

.guide-section {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.guide-section h3 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary);
}

.guide-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.guide-section ul {
    list-style: none;
    margin-top: var(--spacing-sm);
}

.guide-section li {
    padding: var(--spacing-xs) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.score-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.score-badge.high {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.score-badge.good {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.score-badge.medium {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.score-badge.low {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* Credits Options */
.credits-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* ==========================================
   PREMIUM MODAL DESIGN (Phase 12)
   ========================================== */
.modal-premium-dark {
    background: #0f1115 !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px !important;
    padding: 30px !important;
    max-width: 800px !important;
    width: 95% !important;
    color: #fff;
}

.modal-header-simple {
    text-align: left;
    margin-bottom: 25px;
}

.modal-header-simple h2 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.current-plan-status {
    color: #94a3b8;
    font-size: 0.95rem;
}

.current-plan-status span {
    color: #38bdf8;
    font-weight: 700;
}

/* Rewards Section */
.premium-rewards-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.reward-banner-main {
    background: rgba(181, 255, 0, 0.05);
    border: 1px solid rgba(181, 255, 0, 0.15);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.reward-icon-blink {
    font-size: 28px;
    color: #b5ff00;

}

.reward-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    letter-spacing: 1px;
}

.badge-limited {
    background: #b5ff00;
    color: #000;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
}

.reward-text p {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: 4px;
}

.loyalty-bonus-card {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.02) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 16px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.loyalty-icon {
    width: 40px;
    height: 40px;
    background: rgba(181, 255, 0, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.loyalty-title {
    font-weight: 700;
    color: #22c55e;
    font-size: 1rem;
}

.loyalty-text p {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Toggle Switch */
.plan-toggle-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 35px;
}

.toggle-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #94a3b8;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #334155;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked+.slider {
    background-color: #b5ff00;
}

input:checked+.slider:before {
    transform: translateX(24px);
    background-color: #000;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.discount-badge {
    background: rgba(181, 255, 0, 0.1);
    color: #b5ff00;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
}

/* Packages Grid */
.packages-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Final Polish */
.modal-footer-info {
    text-align: center;
    color: #475569;
    font-size: 0.85rem;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}



@media (max-width: 600px) {
    .modal-premium-dark {
        padding: 20px !important;
    }

    .packages-grid-premium {
        grid-template-columns: 1fr;
    }
}

/* Overriding old package styles specifically for premium modal */
.modal-premium-dark .package-card {
    background: #1a1d23;
    border: 1px solid #2d3139;
    align-items: flex-start;
    text-align: left;
    padding: 25px;
}

.modal-premium-dark .package-card.featured {
    border-color: #f43f5e;
    /* Pro-ish red for high tier */
    background: linear-gradient(180deg, #1a1d23 0%, rgba(244, 63, 94, 0.05) 100%);
}

.modal-premium-dark .package-icon {
    margin-left: 0;
    font-size: 32px;
}

.modal-premium-dark .package-name {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.modal-premium-dark .package-price {
    margin-bottom: 10px;
    font-size: 2rem;
}

.modal-premium-dark .package-price .old-price {
    font-size: 1rem;
    color: #475569;
    text-decoration: line-through;
    display: block;
    margin-bottom: -5px;
}

.modal-premium-dark .package-price .yearly-price {
    font-size: 1rem;
    color: #b5ff00;
    font-weight: 700;
}

.modal-premium-dark .package-features li {
    font-weight: 500;
    color: #94a3b8;
}

.modal-premium-dark .buy-button {
    background: #334155;
    border-radius: 10px;
}

.modal-premium-dark .package-card.featured .buy-button {
    background: #f43f5e;
    box-shadow: 0 10px 20px rgba(244, 63, 94, 0.3);
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md);
    padding-top: 96px;
    /* Space for fixed header */
}

.hidden {
    display: none !important;
}

/* ============================================
   HEADER (UI-003)
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(9, 9, 11, 0.8);
    /* var(--bg-primary) with opacity */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
    height: 64px;
    display: flex;
    align-items: center;
}

.header-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Logo */
.logo {
    text-decoration: none;
    font-size: 1.4rem;
    /* Increased size */
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    transition: transform 0.2s;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-text {
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    /* Subtle glow */
}

.logo-dot {
    color: var(--accent);
    font-size: 1.6rem;
    line-height: 0.8;
}

.logo-suffix {
    color: var(--text-tertiary);
    font-weight: 500;
    font-size: 1rem;
    margin-left: 2px;
}

/* Navigation & Actions */
.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.nav-link.special-link {
    color: var(--text-primary);
    background: var(--bg-elevated);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    transition: all 0.2s;
}

.nav-link.special-link:hover {
    border-color: var(--accent-border);
    background: var(--bg-tertiary);
}

.nav-link.special-link svg {
    color: var(--accent);
}

.nav-item {
    font-family: var(--font-primary);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.credits-btn {
    background: rgba(200, 255, 0, 0.05);
    color: var(--accent);
    border: 1px solid rgba(200, 255, 0, 0.1);
}

.credits-btn:hover {
    background: rgba(200, 255, 0, 0.1);
    border-color: rgba(200, 255, 0, 0.2);
}

/* User Avatar */
.user-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.user-avatar-initials {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-menu-container {
    position: relative;
    padding-bottom: 20px;
    margin-bottom: -20px;
}

.user-menu-container:hover .dropdown-menu,
.user-menu-container.active .dropdown-menu {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 260px;
    background: rgba(20, 20, 22, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 10px 15px -3px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 0, 0, 0.2);
    padding: 8px;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transform-origin: top right;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    z-index: 1000;
    display: block;
    /* Always block for animation, controlled by opacity */
}

/* Hover Bridge using pseudo-element */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 4px;
}

.dropdown-email {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 4px 8px;
}

.dropdown-item {
    text-align: left;
    background: none;
    border: none;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-primary);
    width: 100%;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.dropdown-item:active {
    transform: scale(0.98);
}

.dropdown-item.text-danger {
    color: #ff6b6b;
}

.dropdown-item.text-danger:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* Icon Button (Legacy support if needed) */

/* HERO SECTION DUPLICATE REMOVED */

/* PLATFORM TABS DUPLICATE REMOVED */

/* ============================================
   HERO SECTION (UI-004)
   ============================================ */
.hero-section {
    text-align: left;
    margin-bottom: var(--spacing-xl);
    padding-top: var(--spacing-lg);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    letter-spacing: -2px;
}

.gradient-text {
    background: none;
    -webkit-text-fill-color: var(--text-primary);
    color: var(--text-primary);
}

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

/* ============================================
   PLATFORM TABS (UI-005)
   ============================================ */
.platform-tabs {
    display: flex;
    gap: var(--spacing-lg);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: var(--spacing-xl);
    overflow-x: auto;
    padding-bottom: 0;
}

.platform-tabs::-webkit-scrollbar {
    display: none;
}

.platform-tab {
    background: none;
    border: none;
    padding: var(--spacing-md) 0;
    margin-bottom: -1px;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    box-shadow: none;
    opacity: 0.6;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    min-width: auto;
    /* Allow shrinking */
}

/* ============================================
   PLATFORM TABS REDESIGN (UI-Improvement)
   ============================================ */
.platform-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: var(--spacing-2xl);
    padding-top: 32px;
    /* Added spacing from hero text */
    /* Increased to 48px to prevent overlap */
    padding-bottom: 2px;
    flex-wrap: wrap;
    justify-content: center;
    /* Center the tabs */
}

/* Google Tab Styles */
.google-tab:hover,
.google-tab.active {
    border-color: #FF6B00;
}

.google-tab:hover .tab-icon,
.google-tab.active .tab-icon {
    color: #FF6B00;
}

.google-tab.active .tab-label {
    background: linear-gradient(135deg, #FF6B00 0%, #FF2E00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.google-tab .tab-label {
    font-size: 0.85rem;
}

/* Slightly smaller for long text */
.platform-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    /* Pill shape */
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 1;
    /* Reset previous opacity */
    position: relative;
    overflow: hidden;
    min-width: unset;
    /* Reset */
    margin-bottom: 0;
    /* Reset */
}

.platform-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--text-tertiary);
    transform: translateY(-2px);
    color: var(--text-primary);
}

.platform-tab.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 0 15px rgba(200, 255, 0, 0.15);
    /* Soft glow */
}

/* Brand Specific Hovers */
.platform-tab:hover .tab-icon svg,
.platform-tab.active .tab-icon svg {
    filter: drop-shadow(0 0 8px currentColor);
}

.twitter-tab:hover,
.twitter-tab.active {
    border-color: var(--twitter);
}

.twitter-tab:hover .tab-icon,
.twitter-tab.active .tab-icon {
    color: var(--twitter);
}

.youtube-tab:hover,
.youtube-tab.active {
    border-color: var(--youtube);
}

.youtube-tab:hover .tab-icon,
.youtube-tab.active .tab-icon {
    color: var(--youtube);
}

.instagram-tab:hover,
.instagram-tab.active {
    border-color: var(--instagram);
}

.instagram-tab:hover .tab-icon,
.instagram-tab.active .tab-icon {
    color: var(--instagram);
}

.linkedin-tab:hover,
.linkedin-tab.active {
    border-color: var(--linkedin);
}

.linkedin-tab:hover .tab-icon,
.linkedin-tab.active .tab-icon {
    color: var(--linkedin);
}

.reddit-tab:hover,
.reddit-tab.active {
    border-color: var(--reddit);
}

.reddit-tab:hover .tab-icon,
.reddit-tab.active .tab-icon {
    color: var(--reddit);
}


.tab-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    transition: all 0.3s;
}

.tab-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.tab-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: inherit;
}

.tab-desc {
    display: none;
}

/* Active Colors */
.platform-tab.active .tab-label {
    color: var(--text-primary);
}

/* Override all forced colors */
.twitter-tab.active .tab-label,
.youtube-tab.active .tab-label,
.instagram-tab.active .tab-label,
.linkedin-tab.active .tab-label,
.reddit-tab.active .tab-label {
    background: none;
    -webkit-text-fill-color: initial;
    color: var(--text-primary);
}

.tab-icon::after {
    display: none;
}

/* ============================================
   WORKSPACE INFO BAR (UI-007)
   ============================================ */
.workspace-info-bar {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    padding: 0 var(--spacing-sm);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-label {
    font-weight: 500;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* ============================================
   TOOL CARDS (UI-006: Two-Column Workspace)
   ============================================ */
.tools-container {
    margin-bottom: var(--spacing-xl);
}

.tool-section {
    display: none;
    height: 100%;
}

.tool-section.active {
    display: block;
}

.tool-card {
    display: grid;
    grid-template-columns: 480px 1fr;
    /* Widened from 380px */
    grid-template-rows: auto 1fr;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    height: calc(100vh - 200px);
    min-height: 600px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-primary);
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-badge {
    background: rgba(200, 255, 0, 0.1);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(200, 255, 0, 0.2);
}

.form-content {
    grid-column: 1;
    grid-row: 2;
    padding: var(--spacing-lg);
    overflow-y: auto;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
}

.results {
    grid-column: 2;
    grid-row: 1 / span 2;
    background: var(--bg-secondary);
    padding: var(--spacing-xl);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Responsive */
@media (max-width: 900px) {
    .tool-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
        height: auto;
        min-height: auto;
    }

    .card-header {
        grid-column: 1;
        grid-row: 1;
    }

    .form-content {
        grid-column: 1;
        grid-row: 2;
        border-right: none;
        height: auto;
    }

    .results {
        grid-column: 1;
        grid-row: 3;
        border-top: 1px solid var(--border-subtle);
        min-height: 400px;
    }
}

/* ============================================
   CONTENT TYPE & INPUTS
   ============================================ */
.input-group {
    margin-bottom: var(--spacing-md);
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.input-group textarea,
.input-group input {
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.2s;
}

.input-group textarea:focus,
.input-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-muted);
}

.content-type-selector {
    margin-bottom: var(--spacing-md);
}

.type-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.type-btn {
    /* Smaller, pill shaped or minimal */
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.type-btn:hover {
    border-color: var(--text-tertiary);
    color: var(--text-primary);
}

.type-btn.active {
    background: var(--accent);
    color: black;
    border-color: var(--accent);
    font-weight: 600;
}

.tweet-count-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: 4px;
}

.count-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
}

.count-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.count-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 20px;
    text-align: center;
}

/* ============================================
   ADVANCED SETTINGS
   ============================================ */
.advanced-settings-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-bottom: var(--spacing-md);
    transition: all 0.3s ease;
}

.advanced-settings-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.toggle-icon {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.toggle-icon.open {
    transform: rotate(180deg);
}

.advanced-settings-toggle span:nth-child(2) {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.current-settings {
    margin-left: auto;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

.advanced-settings-panel {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    animation: slideDown 0.3s ease;
}

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

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

.setting-group {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-group:last-of-type {
    margin-bottom: var(--spacing-md);
    padding-bottom: 0;
    border-bottom: none;
}

.setting-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: var(--spacing-sm);
}

.setting-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.setting-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.setting-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.setting-btn.active {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* Context Section */
.context-section {
    margin-top: var(--spacing-md);
}

.context-toggle {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm);
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.context-toggle:hover {
    color: var(--text-primary);
}

.context-toggle svg {
    opacity: 0.6;
}

.context-toggle-icon {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.context-toggle-icon.open {
    transform: rotate(180deg);
}

.context-input {
    margin-top: var(--spacing-sm);
    animation: slideDown 0.3s ease;
}

.context-input textarea {
    width: 100%;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.context-input textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.context-input textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.context-hint {
    margin-top: var(--spacing-xs);
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
}



.input-group {
    margin-bottom: var(--spacing-md);
}

.input-group label {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.input-group textarea,
.input-group select {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.generate-button {
    width: 100%;
    margin-top: auto;
    padding: 12px;
    background: var(--accent);
    color: black;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.generate-button:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.generate-button:active {
    transform: scale(0.99);
}

.generate-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    background: var(--text-disabled);
}

.credit-badge {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.button-icon {
    display: none;
}

.button-glow {
    display: none;
}

/* ============================================
   RESULTS & VIRAL SCORE
   ============================================ */
.results {
    margin-top: var(--spacing-lg);
}

/* Viral Score Analyzer */
.viral-score-container {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    animation: slideIn 0.5s ease-out;
}

.viral-score-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.viral-score-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.2rem;
    font-weight: 600;
}

.viral-score-title svg {
    color: var(--secondary);
}

.viral-score-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.viral-score-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.viral-score-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 1s ease-out;
}

.viral-score-fill.high {
    background: var(--gradient-success);
}

.viral-score-fill.good {
    background: var(--gradient-accent);
}

.viral-score-fill.medium {
    background: var(--gradient-warm);
}

.viral-score-fill.low {
    background: var(--gradient-secondary);
}

.viral-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-sm);
}

.viral-metric {
    text-align: center;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
}

.viral-metric-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.viral-metric-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Result Items */
.result-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

.result-item h4 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary);
}

.result-content {
    background: rgba(0, 0, 0, 0.3);
    padding: var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
    white-space: pre-wrap;
    font-size: 0.95rem;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.result-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.action-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* Loading State */
.loading {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--spacing-md);
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ============================================
   NOTIFICATIONS
   ============================================ */
#notificationContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    padding: 16px 24px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInNotif 0.4s ease-out;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.notification.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.9) 0%, rgba(5, 150, 105, 0.9) 100%);
}

.notification.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.9) 0%, rgba(217, 119, 6, 0.9) 100%);
}

.notification.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.9) 100%);
}

.notification.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.9) 0%, rgba(37, 99, 235, 0.9) 100%);
}

@keyframes slideInNotif {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

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

@keyframes slideOutNotif {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* ============================================
   FOOTER
   ============================================ */
/* ============================================
   FOOTER (UI-011)
   ============================================ */
.footer {
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-lg) 0;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ============================================
   RESPONSIVE DESIGN (UI-013)
   ============================================ */
@media (max-width: 1024px) {
    .platform-tabs {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    /* Layout */
    .container {
        padding-left: var(--spacing-md);
        padding-right: var(--spacing-md);
    }

    /* Header */
    .header {
        flex-direction: column;
        gap: var(--spacing-md);
        padding: var(--spacing-md) 0;
        height: auto;
    }

    .header-left,
    .header-center {
        width: 100%;
        justify-content: center;
    }

    .header-right {
        width: 100%;
        justify-content: center;
        gap: 12px;
        /* Add spacing between buttons */
        flex-wrap: wrap;
        /* Allow wrapping if screen is very small */
    }

    .user-menu-container {
        margin-left: 0;
        /* Reset auto margin on mobile to allow centering */
    }

    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }

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

    /* Tabs */
    .platform-tabs {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .platform-tab {
        width: 100%;
        justify-content: center;
        padding: 16px;
    }

    /* Workspace Info */
    .workspace-info-bar {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* Footer */
    .footer-inner {
        flex-direction: column;
        gap: var(--spacing-lg);
        text-align: center;
    }

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

    /* Tool Card Padding Override */
    .tool-card {
        padding: var(--spacing-md);
    }
}

/* ============================================
   RESPONSIVE TABLES & STUDIO FIXES
   ============================================ */
/* ============================================
   RESPONSIVE TABLES & STUDIO FIXES
   ============================================ */
/* Card Layout for Mobile Tables */
@media (max-width: 768px) {

    /* Force table to not be like tables anymore */
    .history-table,
    .history-table thead,
    .history-table tbody,
    .history-table th,
    .history-table td,
    .history-table tr {
        display: block;
    }

    /* Hide table headers (but not display: none;, for accessibility) */
    .history-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .history-table tr {
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        margin-bottom: var(--spacing-md);
        background: var(--bg-elevated);
        padding: var(--spacing-sm);
    }

    .history-table td {
        /* Behave  like a "row" */
        border: none;
        border-bottom: 1px solid var(--border-subtle);
        position: relative;
        padding-left: 50% !important;
        text-align: right;
        padding-top: 10px;
        padding-bottom: 10px;
        white-space: normal;
    }

    .history-table td:last-child {
        border-bottom: none;
    }

    .history-table td:before {
        /* Now like a table header */
        position: absolute;
        /* Top/left values mimic padding */
        top: 10px;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--text-secondary);
    }

    /* Label the data */
    .history-table td:nth-of-type(1):before {
        content: "ID";
    }

    .history-table td:nth-of-type(2):before {
        content: "Başlık";
    }

    .history-table td:nth-of-type(3):before {
        content: "Platform";
    }

    .history-table td:nth-of-type(4):before {
        content: "Tarih";
    }

    .history-table td:nth-of-type(5):before {
        content: "İşlem";
    }
}

/* Mobile specific overrides for Studio */
@media (max-width: 768px) {
    .studio-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-subtle);
        padding: var(--spacing-md);
    }

    .main-content {
        padding: var(--spacing-md);
    }

    /* Adjust platform tabs for mobile */
    .platform-tabs {
        gap: 8px;
    }

    .platform-tab {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    /* History table specific */
    .history-accordion-list {
        padding-right: 0;
    }
}

/* ============================================
   SCROLLBAR & SELECTION (UI-012)
   ============================================ */
/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-active);
    border-radius: 3px;
    transition: background 0.2s;
}

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

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border-active) transparent;
}

/* Selection */
::selection {
    background: var(--accent-muted);
    color: var(--accent);
}



/* ============================================
   CONTENT HISTORY
   ============================================ */
/* ============================================
   CONTENT HISTORY (Phase 13 Accordion)
   ============================================ */
/* ============================================
   CONTENT HISTORY (UI-009)
   ============================================ */
.history-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 4px;
    margin-top: var(--spacing-md);
}

.history-accordion-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.2s ease;
}

.history-accordion-item:hover {
    border-color: var(--border-hover);
}

.history-accordion-item.active {
    border-color: var(--accent-border);
    background: var(--bg-tertiary);
}

.history-summary {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    position: relative;
}

.history-avatar {
    width: 36px;
    height: 36px;
    background: var(--bg-elevated);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.history-main-info {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 2px;
}

.history-info-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-handle {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.history-platform-tag {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.history-preview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding-left: 10px;
}

.badge-type {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.badge-spark {
    color: var(--info);
    border-color: rgba(59, 130, 246, 0.2);
    background: rgba(59, 130, 246, 0.1);
}

.badge-punch {
    color: var(--accent);
    border-color: var(--accent-border);
    background: var(--accent-muted);
}

.badge-storm {
    color: var(--error);
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.1);
}

.history-actions-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}

.history-delete-btn {
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.history-delete-btn:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

.expand-arrow {
    color: var(--text-tertiary);
    transition: transform 0.2s;
    font-size: 0.8rem;
}

.active .expand-arrow {
    transform: rotate(180deg);
}

.history-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
}

.active .history-details {
    max-height: 600px;
}

.history-full-content {
    padding: 16px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.details-inner {
    padding: 0 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-context-container {
    background: #1e2229;
    border: 1px solid #2d3139;
    border-radius: 12px;
    padding: 15px;
    position: relative;
    border-left: 3px solid #38bdf8;
}

.input-context-text {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
}

.output-content-container {
    background: #0f1115;
    border: 1px solid #1e2229;
    border-radius: 12px;
    padding: 20px;
}

.output-content-text {
    font-size: 1rem;
    color: #e2e8f0;
    line-height: 1.6;
    white-space: pre-wrap;
}

.details-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.copy-btn-history {
    background: #2d3139;
    color: #e2e8f0;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.copy-btn-history:hover {
    background: #3d444d;
}

.copy-btn-history svg {
    color: #94a3b8;
}

/* ============================================
   PHASE 15: PREMIUM PAYMENT UI & UX
   ============================================ */

/* Checkout Modal Styling */
#checkoutModal .modal-content {
    background: #0f1115;
    border: 1px solid rgba(181, 255, 0, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 20px rgba(181, 255, 0, 0.05);
}

.modal-header-simple h2 {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.premium-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 25px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.premium-form input,
.premium-form select {
    width: 100%;
    background: #1a1d23;
    border: 1px solid #2d3139;
    padding: 14px 16px;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s ease;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    /* Custom styling for select */
}

.premium-form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.premium-form input:focus,
.premium-form select:focus {
    border-color: #b5ff00;
    background: #1e2229;
    box-shadow: 0 0 0 4px rgba(181, 255, 0, 0.05);
}

.checkout-submit-btn {
    background: linear-gradient(135deg, #b5ff00 0%, #8ec400 100%);
    color: #000;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(181, 255, 0, 0.2);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.checkout-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(181, 255, 0, 0.4);
    filter: brightness(1.1);
}

.checkout-submit-btn:active {
    transform: translateY(0);
}

.checkout-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #2d3139;
    color: #64748b;
    box-shadow: none;
}

/* Buy Button Premium Overhaul */
.buy-button {
    background: #1a1d23 !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 14px 24px !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    width: 100%;
    margin-top: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.package-card.featured .buy-button {
    background: linear-gradient(135deg, #b5ff00 0%, #8ec400 100%) !important;
    color: #000 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(181, 255, 0, 0.2) !important;
}

.buy-button:hover {
    background: #2d3139 !important;
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.package-card.featured .buy-button:hover {
    box-shadow: 0 8px 20px rgba(181, 255, 0, 0.4) !important;
    background: linear-gradient(135deg, #c4ff33 0%, #9dd900 100%) !important;
}

.package-card.featured[style*="border: 2px solid #ff007a"] .buy-button {
    background: linear-gradient(135deg, #ff007a 0%, #cc0061 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(255, 0, 122, 0.2) !important;
}

.package-card.featured[style*="border: 2px solid #ff007a"] .buy-button:hover {
    box-shadow: 0 8px 20px rgba(255, 0, 122, 0.4) !important;
    background: linear-gradient(135deg, #ff3395 0%, #e6006e 100%) !important;
}

/* Trust Elements UI */
.security-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.security-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 500;
}

.security-item svg {
    width: 16px;
    height: 16px;
    color: #b5ff00;
}

/* Content History Mobile Fixes */
@media (max-width: 600px) {
    .modal-content.modal-premium-dark {
        padding: 16px !important;
        width: 100% !important;
        border-radius: 16px !important;
    }

    .history-summary {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }

    .history-main-info {
        width: 100%;
    }

    .history-preview {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        height: auto;
    }

    .history-actions-header {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .history-avatar {
        display: none;
    }
}

/* Skeleton Loading Animation */
.skeleton-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.skeleton-header {
    height: 28px;
    width: 40%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin-bottom: 24px;
}

.skeleton-line {
    height: 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 12px;
}

.skeleton-line.short {
    width: 70%;
}

.skeleton-line.medium {
    width: 85%;
}

.skeleton-line.long {
    width: 100%;
}

.skeleton-action {
    height: 36px;
    width: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    margin-top: 16px;
}

/* Shimmer Effect */
.skeleton-shimmer::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.03) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-150%) skewX(-20deg);
    }

    100% {
        transform: translateX(150%) skewX(-20deg);
    }
}

/* UI Enhancement: Language Selector */
.lang-switch-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    /* More subtle border */
    border-radius: 20px;
    padding: 6px 10px;
    gap: 12px;
    transition: all 0.2s ease;
}

.lang-switch-container:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.lang-sep {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.lang-option {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.3;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    filter: grayscale(100%);
    transform: scale(0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-option:hover {
    opacity: 0.8;
    filter: grayscale(0%);
    transform: scale(1);
    background: none;
    /* Override potential inherited backgrounds */
}

.lang-option.active {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.2);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.lang-flag {
    font-size: 1.4rem;
    /* Slightly larger */
    line-height: 1;
    display: block;
}


/* UI Enhancement: Neon Algorithm Glow */
#algorithm-status {
    position: relative;
    border: 1px solid rgba(181, 255, 0, 0.4);
    background: rgba(181, 255, 0, 0.05);
    box-shadow: 0 0 10px rgba(181, 255, 0, 0.1);
    animation: neon-pulse 3s infinite ease-in-out;
}

#algorithm-status .info-label {
    color: #e2e8f0;
}

#algorithm-status .info-value {
    color: #b5ff00;
    text-shadow: 0 0 8px rgba(181, 255, 0, 0.5);
    font-weight: 700;
}

@keyframes neon-pulse {
    0% {
        box-shadow: 0 0 5px rgba(181, 255, 0, 0.05);
        border-color: rgba(181, 255, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(181, 255, 0, 0.2);
        border-color: rgba(181, 255, 0, 0.6);
    }

    100% {
        box-shadow: 0 0 5px rgba(181, 255, 0, 0.05);
        border-color: rgba(181, 255, 0, 0.3);
    }
}

/* PREMIUM USER PROFILE MODAL (UI-017) */
.modal-premium-profile {
    background: #141416;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    overflow: hidden;
    padding: 0 !important;
    max-width: 480px;
    width: 100%;
}

/* Profile Header */
.profile-header-premium {
    position: relative;
    background: linear-gradient(180deg, rgba(30, 30, 35, 1) 0%, rgba(20, 20, 22, 0) 100%);
    padding: 30px 20px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: var(--bg-elevated);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    box-shadow: 0 0 25px rgba(181, 255, 0, 0.1);
}

.profile-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #b5ff00;
    color: #000;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #141416;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.profile-header-premium h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

/* Profile Body */
.profile-body-premium {
    padding: 25px;
}

.profile-info-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.info-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 0;
}

.info-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 8px 0;
}

.info-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}

.info-content {
    display: flex;
    flex-direction: column;
}

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

.info-val {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Forms */
.form-group-premium {
    margin-bottom: 20px;
}

.form-group-premium label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: color 0.2s;
}

.form-control-premium {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 12px 12px 60px !important;
    /* Increased to 60px with force */
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.form-control-premium:focus {
    outline: none;
    border-color: #b5ff00;
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(181, 255, 0, 0.1);
}

.form-control-premium:focus+.input-icon,
.input-wrapper:focus-within .input-icon {
    color: #b5ff00;
}

.btn-premium-save {
    background: linear-gradient(135deg, #b5ff00 0%, #8ec400 100%);
    color: #000;
    border: none;
    padding: 14px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(181, 255, 0, 0.15);
}

.btn-premium-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(181, 255, 0, 0.3);
}

.btn-premium-save:active {
    transform: translateY(0);
}

.section-title {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: 600;
}/* Fix for Premium Modal Close Button (UI-019) */
.modal-premium-profile .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    /* Ensure on top of header */
    color: rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.3);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-premium-profile .modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: rotate(90deg);
}/* STUDIO MOBILE & TABLE REDESIGN (UI-022) */

/* 1. Mobile Header & Sidebar */
.mobile-menu-btn {
    display: none;
    /* Hidden on desktop */
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 8px;
    cursor: pointer;
    margin-right: 15px;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .studio-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 1000;
        background: #000;
        /* Solides schwarz für Lesbarkeit */
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        transition: left 0.3s ease;
        padding-top: 20px;
    }

    .sidebar.active {
        left: 0;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    /* Overlay when sidebar is active */
    .sidebar.active::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
        backdrop-filter: blur(5px);
    }
}

/* 2. Studio Table (Premium) */
.studio-table-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.studio-table {
    width: 100%;
    border-collapse: collapse;
}

.studio-table th {
    text-align: left;
    padding: 16px 20px;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-tertiary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
}

.studio-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-size: 0.95rem;
    vertical-align: middle;
}

.studio-table tr:last-child td {
    border-bottom: none;
}

.studio-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Topic Cell Styling */
.topic-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.topic-text {
    font-weight: 500;
    color: var(--text-primary);
}

/* Action Button */
.btn-view {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-view:hover {
    background: rgba(181, 255, 0, 0.1);
    border-color: rgba(181, 255, 0, 0.3);
    color: #b5ff00;
}

/* 3. Mobile Responsive Tables (Card Layout) */
@media (max-width: 768px) {
    .studio-table thead {
        display: none;
    }

    .studio-table,
    .studio-table tbody,
    .studio-table tr,
    .studio-table td {
        display: block;
        width: 100%;
    }

    .studio-table tr {
        margin-bottom: 15px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 12px;
        padding: 15px;
    }

    .studio-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        text-align: right;
    }

    .studio-table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
        justify-content: flex-end;
        /* Button right aligned */
    }

    .studio-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.85rem;
        color: var(--text-tertiary);
        text-transform: uppercase;
        margin-right: 15px;
        text-align: left;
    }

    /* Adjust topic cell for mobile */
    .topic-cell {
        justify-content: flex-end;
    }
}/* HOME MOBILE MENU (UI-023) */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-content {
    width: 280px;
    height: 100%;
    background: #141416;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-close {
    align-self: flex-end;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    margin-bottom: 20px;
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    color: var(--text-primary);
    text-decoration: none;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: none;
    /* Reset for button */
    border: none;
    /* Reset for button */
    text-align: left;
    width: 100%;
    cursor: pointer;
}

.mobile-nav-link.special {
    background: linear-gradient(135deg, rgba(181, 255, 0, 0.1) 0%, rgba(181, 255, 0, 0.05) 100%);
    border: 1px solid rgba(181, 255, 0, 0.2);
    color: #b5ff00;
}

.mobile-nav-link .icon {
    font-size: 1.2rem;
}

.mobile-menu-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-lang-switch {
    display: flex;
    gap: 10px;
}

.mobile-lang-switch button {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.mobile-lang-switch button.active {
    background: #b5ff00;
    color: #000;
    border-color: #b5ff00;
    font-weight: 600;
}

/* Header Responsive Logic */
@media (max-width: 768px) {
    .header-right {
        display: none;
        /* Hide desktop nav */
    }

    .header-right .user-menu-container {
        display: block;
        /* Keep user avatar if you want, or hide all */
        /* For now, let's hide everything and put it in mobile menu if needed. 
           But actually, usually user wants to see avatar. 
           Let's keep avatar visible but hide others. */
        /* But wait, header-right display:none hides children. 
            So we need to selectively hide. */
    }
}

/* Better Responsive logic */
@media (max-width: 768px) {
    .header-right {
        gap: 10px;
    }

    .header-right .nav-link,
    .header-right .credits-btn,
    .header-right .lang-switch-container {
        display: none;
    }

    /* Ensure User Menu stays visible if we want, or hide it too since link is in menu? 
       Actually user menu has "Profile, Logout". 
       Mobile menu has "Credits, Guide, Studio".
       Let's keep User Avatar visible in header-right. */
}/* =========================================
   EMERGENCY MOBILE FIXES & PREMIUM STUDIO
   ========================================= */

/* 1. HOME MOBILE MENU OVERLAY FIX */
.mobile-menu-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6) !important;
    /* Semi-transparent backdrop */
    backdrop-filter: blur(8px) !important;
    z-index: 9999 !important;
    /* Highest priority */
    display: flex;
    justify-content: flex-end;
    /* Align sidebar to right */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-content {
    width: 80% !important;
    /* Responsive width */
    max-width: 320px;
    height: 100%;
    background: #141416 !important;
    /* Solid dark background */
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-close {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 30px;
}

/* 2. STUDIO MOBILE SIDEBAR FIX */
@media (max-width: 768px) {
    .studio-container {
        flex-direction: column;
        position: relative;
    }

    /* Sidebar as Overlay */
    .sidebar {
        position: fixed !important;
        left: -100% !important;
        top: 0;
        bottom: 0;
        width: 280px !important;
        height: 100vh;
        z-index: 9999 !important;
        background: #0a0a0b !important;
        /* Solid premium black */
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 20px;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .sidebar.active {
        left: 0 !important;
    }

    /* Backdrop for sidebar */
    .sidebar.active::before {
        content: '';
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(5px);
        z-index: -1;
        left: 0;
        /* Align with screen */
    }

    /* Top Bar Mobile Layout */
    .top-bar {
        position: sticky;
        top: 0;
        z-index: 50;
        /* Below sidebar */
        background: rgba(20, 20, 22, 0.9);
        backdrop-filter: blur(12px);
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .mobile-menu-btn {
        display: block !important;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    /* Hide Breadcrumb on very small screens if needed */
    .breadcrumb {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* 3. PREMIUM STUDIO TABLES (Corrected Card Layout) */
@media (max-width: 768px) {

    /* Reset Table */
    .studio-table-container {
        background: transparent !important;
        border: none !important;
    }

    .studio-table thead {
        display: none;
    }

    .studio-table tbody tr {
        display: block;
        background: rgba(20, 20, 22, 0.6);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 16px;
        padding: 20px;
        margin-bottom: 16px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    }

    .studio-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: right;
    }

    .studio-table td:last-child {
        border-bottom: none;
        padding-top: 20px;
        justify-content: center;
        /* Center action button */
    }

    .studio-table td::before {
        content: attr(data-label);
        font-size: 0.85rem;
        color: var(--text-secondary);
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Premium Button Mobile */
    .btn-view {
        width: 100%;
        justify-content: center;
        background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 12px;
        font-weight: 600;
        color: #fff;
    }
}/* =========================================
   FINAL MOBILE POLISH (UI-025, UI-026)
   ========================================= */

/* 1. Mobile User Profile in Menu */
.mobile-user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b5ff00 0%, #8ec700 100%);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(181, 255, 0, 0.2);
}

.mobile-user-info {
    display: flex;
    flex-direction: column;
}

.mobile-username {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.mobile-email {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.mobile-logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    color: #ff6b6b;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-logout-btn:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* 2. Studio Sidebar Polish (Admin-like) */
@media (max-width: 768px) {

    /* Ensure Sidebar is top-level */
    .sidebar {
        z-index: 10001 !important;
        /* Higher than everything */
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.8);
        width: 260px !important;
        background: #0a0a0b !important;
    }

    /* Separate Overlay Element */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
        z-index: 10000 !important;
        /* Just below sidebar */
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
    }

    /* Toggle Button Z-Index */
    .mobile-menu-btn {
        z-index: 9999;
        /* High enough to be clickable */
        position: relative;
    }
}/* =========================================
   FINAL MOBILE LAYOUT V3 (UI-027, UI-028, UI-029)
   ========================================= */

/* 1. Header Layout Fix (Logo Left, Menu Right) */
@media (max-width: 768px) {
    .header-inner {
        justify-content: space-between;
        /* Push items to edges */
        padding: 0 15px;
    }

    .header-left {
        order: 1;
        /* Logo First */
        flex: 0 0 auto;
    }

    .header-right {
        order: 2;
        /* Menu Last */
        display: flex !important;
        /* Ensure container is visible */
        align-items: center;
        gap: 10px;
        flex: 0 0 auto;
    }

    .mobile-menu-btn {
        display: flex !important;
        order: 99;
        /* Ensure it's the last item in header-right */
        margin-left: auto;
        /* Push to far right if needed */
    }

    /* Hide other desktop nav items but keep container for mobile btn */
    .header-right .nav-link,
    .header-right .credits-btn,
    .header-right .lang-switch-container {
        display: none !important;
    }
}

/* 2. Mobile Guest Actions (Login/Register in Menu) */
.mobile-guest-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-btn-primary {
    flex: 1;
    background: #b5ff00;
    color: #000;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
}

.mobile-btn-secondary {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
}

/* 3. Studio Content Visibility Fix */
@media (max-width: 768px) {
    .studio-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        overflow-x: hidden;
    }

    .main-content {
        width: 100% !important;
        margin-left: 0 !important;
        padding: 0 !important;
        /* Reset padding */
    }

    .content-grid {
        display: block !important;
        width: 100% !important;
        padding: 15px !important;
        box-sizing: border-box;
    }

    /* Force visibility of input panel */
    .input-panel {
        display: block !important;
        width: 100% !important;
        background: rgba(20, 20, 22, 0.6);
        /* Ensure contrast */
    }

    /* Ensure form inputs are clickable */
    .studio-input,
    .studio-select {
        pointer-events: auto !important;
    }
}
/* =========================================
   MOBILE MENU ACTION BUTTON FIX
   ========================================= */

/* Ensure action buttons in mobile menu are clickable */
.mobile-nav-link.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    background: rgba(181, 255, 0, 0.1);
    border: 1px solid rgba(181, 255, 0, 0.2);
    border-radius: 12px;
    color: #b5ff00;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.2s;
    pointer-events: auto !important;
    z-index: 10;
    position: relative;
}

.mobile-nav-link.action-btn:hover {
    background: rgba(181, 255, 0, 0.2);
}

/* Mobile Profile Avatar Button (in header) */
@media (max-width: 768px) {
    .header-right .user-menu {
        display: none !important;
    }

    /* Show simple avatar button on mobile */
    .mobile-profile-btn {
        display: flex !important;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: linear-gradient(135deg, #b5ff00, #8ec700);
        color: #000;
        font-weight: 700;
        font-size: 0.9rem;
        align-items: center;
        justify-content: center;
        border: none;
        cursor: pointer;
        margin-right: 10px;
    }
}

@media (min-width: 769px) {
    .mobile-profile-btn {
        display: none !important;
    }
}

/* =========================================
   PROFILE BUTTON POSITION FIX
   ========================================= */
@media (max-width: 768px) {
    .header-right {
        display: flex !important;
        align-items: center;
        gap: 8px;
        padding-right: 10px;
    }

    .mobile-profile-btn {
        flex-shrink: 0;
        width: 34px !important;
        height: 34px !important;
        min-width: 34px;
        font-size: 0.85rem;
    }

    .mobile-menu-btn {
        flex-shrink: 0;
        width: 38px !important;
        height: 38px !important;
        min-width: 38px;
    }

    /* Ensure mobile menu overlay buttons are fully clickable */
    .mobile-menu-overlay .mobile-nav-link,
    .mobile-menu-overlay .action-btn,
    .mobile-menu-overlay button {
        pointer-events: auto !important;
        cursor: pointer !important;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-menu-content {
        pointer-events: auto !important;
    }
}

/* =========================================
   MOBILE GUEST BUTTONS - OVERFLOW FIX
   ========================================= */
@media (max-width: 768px) {
    .header-inner {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
        overflow: hidden;
    }

    .header-right {
        overflow: visible;
    }

    /* Ensure profile button doesn't overflow */
    .mobile-profile-btn {
        position: relative;
        right: 0;
    }

    /* Hide any desktop login buttons on mobile */
    .header-right .login-btn,
    .header-right .register-link {
        display: none !important;
    }
}

/* =========================================
   HIDE MOBILE PROFILE BUTTON IN HEADER
   ========================================= */
@media (max-width: 768px) {
    /* Hide the standalone profile button - all options are in hamburger menu */
    .mobile-profile-btn {
        display: none !important;
    }

    /* Hide any user dropdown menu on mobile */
    .user-menu,
    .user-dropdown {
        display: none !important;
    }
}

/* =========================================
   HIDE DESKTOP USER MENU ON MOBILE (FINAL)
   ========================================= */
@media (max-width: 768px) {
    /* Hide the entire user button and dropdown on mobile */
    .user-btn,
    .user-avatar-initials,
    #userDropdown,
    .dropdown-menu {
        display: none !important;
    }

    /* Mobile menu section styling */
    .mobile-menu-section {
        padding: 15px 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        margin-bottom: 15px;
    }

    .mobile-menu-section .mobile-nav-link {
        margin-bottom: 5px;
    }
}

/* =========================================
   MODAL SCROLL FIX FOR MOBILE
   ========================================= */
@media (max-width: 768px) {
    /* Allow modal to scroll on mobile */
    .modal {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .modal-content {
        max-height: 90vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        margin: 20px auto !important;
        position: relative;
    }

    /* Ensure profile modal specifically is scrollable */
    .modal-premium-profile {
        max-height: 85vh !important;
        overflow-y: auto !important;
        padding-bottom: 30px !important;
    }

    /* Profile modal wrapper */
    #profileModal .modal-content,
    #profileModal {
        height: auto !important;
        max-height: 95vh !important;
        overflow-y: auto !important;
    }
}
