/**
 * Product Manager - Executive UI Styles
 * =====================================
 * Modern, professional design with dark theme and gold accents
 */

/* ==================== CSS Variables ==================== */
:root {
    /* Primary Colors - Executive Navy Blue */
    --primary-900: #0d1421;
    --primary-800: #1a237e;
    --primary-700: #283593;
    --primary-600: #303f9f;
    --primary-500: #3949ab;

    /* Accent Colors - Gold */
    --accent-500: #c9a227;
    --accent-400: #d4af37;
    --accent-300: #f4d03f;
    --accent-glow: rgba(201, 162, 39, 0.3);

    /* Background Colors - Dark Theme */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-elevated: #30363d;

    /* Text Colors */
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --text-tertiary: #6e7681;
    --text-accent: #c9a227;

    /* Status Colors */
    --success: #238636;
    --success-bg: rgba(35, 134, 54, 0.15);
    --error: #f85149;
    --error-bg: rgba(248, 81, 73, 0.15);
    --warning: #d29922;
    --info: #58a6ff;

    /* Borders */
    --border-primary: rgba(48, 54, 61, 0.8);
    --border-accent: rgba(201, 162, 39, 0.3);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 20px rgba(201, 162, 39, 0.2);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
}

/* ==================== Reset & Base ==================== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(26, 35, 126, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(201, 162, 39, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(26, 35, 126, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* ==================== Header ==================== */
.header {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-900) 100%);
    border-bottom: 1px solid var(--border-accent);
    padding: var(--space-md) var(--space-xl);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-300) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-glow);
}

.logo-icon svg {
    width: 28px;
    height: 28px;
    color: var(--primary-900);
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--accent-500), var(--accent-300));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.header-stats {
    display: flex;
    gap: var(--space-xl);
}

.stat-item {
    text-align: center;
    padding: var(--space-sm) var(--space-lg);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-primary);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-400);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==================== Main Content ==================== */
.main-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-2xl);
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--space-xl);
    min-height: calc(100vh - 100px);
}

/* ==================== Panels ==================== */
.panel {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-primary);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.panel-header {
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h2 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-header h2 svg {
    width: 22px;
    height: 22px;
    color: var(--accent-500);
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-add {
    background: linear-gradient(135deg, var(--success) 0%, #2ea043 100%);
    color: white;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(35, 134, 54, 0.4);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-400) 100%);
    color: var(--primary-900);
    font-weight: 600;
    width: 100%;
    padding: var(--space-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-export {
    flex: 1;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.btn-export:hover:not(:disabled) {
    background: var(--bg-elevated);
    border-color: var(--accent-500);
    color: var(--accent-400);
}

.btn-export:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==================== Add Form ==================== */
.add-form {
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    display: none;
    animation: slideDown var(--transition-normal);
}

.add-form.active {
    display: block;
}

/* ==================== Import Section ==================== */
.btn-import {
    background: linear-gradient(135deg, #1565c0 0%, #1976d2 100%);
    color: white;
}

.btn-import:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.4);
}

.import-section {
    padding: var(--space-lg);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    display: none;
    animation: slideDown var(--transition-normal);
}

.import-section.active {
    display: block;
}

.import-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(21, 101, 192, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.import-info svg {
    width: 24px;
    height: 24px;
    color: var(--info);
    flex-shrink: 0;
}

.import-actions {
    display: flex;
    gap: var(--space-md);
}

.btn-template {
    flex: 1;
    background: linear-gradient(135deg, #2e7d32 0%, #388e3c 100%);
    color: white;
    text-decoration: none;
    padding: var(--space-md);
}

.btn-template:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.4);
}

.btn-upload {
    flex: 1;
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-400) 100%);
    color: var(--primary-900);
    cursor: pointer;
    padding: var(--space-md);
}

.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-row {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-500);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

/* ==================== Search ==================== */
.search-container {
    position: relative;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

.search-icon {
    position: absolute;
    left: calc(var(--space-lg) + 12px);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: var(--space-md) var(--space-md) var(--space-md) 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-500);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

/* Search Predictions */
.search-predictions {
    position: absolute;
    top: 100%;
    left: var(--space-lg);
    right: var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 50;
    max-height: 200px;
    overflow-y: auto;
}

.search-predictions.active {
    display: block;
    animation: fadeIn var(--transition-fast);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prediction-item {
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: background var(--transition-fast);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prediction-item:hover {
    background: var(--bg-tertiary);
}

.prediction-item .name {
    color: var(--text-primary);
}

.prediction-item .price {
    color: var(--accent-400);
    font-weight: 500;
}

/* ==================== Products List ==================== */
.products-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

.product-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.product-card:hover {
    border-color: var(--accent-500);
    transform: translateX(4px);
}

.product-card.selected {
    border-color: var(--accent-500);
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.1) 0%, var(--bg-tertiary) 100%);
    box-shadow: inset 0 0 0 1px var(--accent-glow);
}

.product-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.product-card.selected .product-checkbox {
    background: var(--accent-500);
    border-color: var(--accent-500);
}

.product-checkbox svg {
    width: 14px;
    height: 14px;
    color: var(--primary-900);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.product-card.selected .product-checkbox svg {
    opacity: 1;
}

.product-info {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-meta {
    display: flex;
    gap: var(--space-md);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-400);
    white-space: nowrap;
}

.product-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.quantity-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: var(--radius-sm);
    transition: all var(--transition-fast);
}

.quantity-btn:hover {
    background: var(--bg-tertiary);
    color: var(--accent-400);
}

.quantity-btn svg {
    width: 14px;
    height: 14px;
}

.quantity-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.delete-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.delete-btn:hover {
    background: var(--error-bg);
    border-color: var(--error);
    color: var(--error);
}

.delete-btn svg {
    width: 16px;
    height: 16px;
}

/* ==================== Summary Panel ==================== */
.summary-panel {
    position: sticky;
    top: 120px;
    height: fit-content;
    max-height: calc(100vh - 160px);
}

.summary-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    text-align: center;
    color: var(--text-tertiary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-md);
    opacity: 0.3;
}

.empty-state p {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.empty-state span {
    font-size: 0.8rem;
}

.selected-items {
    display: none;
}

.selected-items.active {
    display: block;
}

.selected-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    animation: fadeIn var(--transition-fast);
}

.selected-item-info {
    flex: 1;
    min-width: 0;
}

.selected-item-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-item-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.selected-item-total {
    font-weight: 600;
    color: var(--accent-400);
    white-space: nowrap;
    margin-left: var(--space-md);
}

/* ==================== Summary Footer ==================== */
.summary-footer {
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    border-top: 1px solid var(--border-primary);
}

.total-display {
    margin-bottom: var(--space-md);
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.total-row.total-final {
    padding-top: var(--space-sm);
    margin-top: var(--space-sm);
    border-top: 1px solid var(--border-primary);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.total-row.total-final span:last-child {
    color: var(--accent-400);
    font-size: 1.5rem;
}

.export-buttons {
    display: flex;
    gap: var(--space-sm);
}

/* ==================== Toast Notifications ==================== */
.toast-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideInRight var(--transition-normal);
    max-width: 350px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--error);
}

.toast.info {
    border-left: 4px solid var(--info);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--error);
}

/* ==================== Mobile Tabs ==================== */
.mobile-tabs {
    display: none;
    position: sticky;
    top: 80px;
    z-index: 99;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-sm);
    justify-content: center;
}

.mobile-tabs .tab-btn {
    flex: 1;
    max-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
}

.mobile-tabs .tab-btn svg {
    width: 18px;
    height: 18px;
}

.mobile-tabs .tab-btn.active {
    background: linear-gradient(135deg, var(--accent-500) 0%, var(--accent-400) 100%);
    color: var(--primary-900);
    border-color: var(--accent-500);
    font-weight: 600;
}

.tab-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--error);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.2;
}

/* ==================== Mobile Responsive Styles ==================== */
@media (max-width: 1024px) {
    /* Show mobile tabs */
    .mobile-tabs {
        display: flex;
    }

    /* Header adjustments */
    .header {
        padding: var(--space-sm) var(--space-md);
    }

    .header-content {
        flex-wrap: wrap;
        gap: var(--space-md);
    }

    .logo-text h1 {
        font-size: 1rem;
    }

    .logo-text span {
        font-size: 0.65rem;
    }

    .header-stats {
        gap: var(--space-md);
        flex-wrap: wrap;
    }

    .stat-item {
        padding: var(--space-xs) var(--space-md);
        flex: 1;
        min-width: 100px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .stat-label {
        font-size: 0.65rem;
    }

    /* Main content adjustments */
    .main-content {
        padding: var(--space-md);
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    /* Panel visibility control */
    .products-panel:not(.active),
    .summary-panel:not(.active) {
        display: none !important;
    }

    .products-panel.active,
    .summary-panel.active {
        display: flex !important;
    }

    /* Summary panel adjustments */
    .summary-panel {
        position: relative;
        top: 0;
        max-height: none;
    }

    /* Panel header adjustments */
    .panel-header {
        padding: var(--space-md);
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .panel-header h2 {
        font-size: 1rem;
        flex: 1;
        min-width: 100%;
    }

    .panel-header .btn {
        font-size: 0.8rem;
        padding: var(--space-xs) var(--space-sm);
    }

    .panel-header .btn svg {
        width: 16px;
        height: 16px;
    }

    /* Product card adjustments */
    .product-card {
        flex-wrap: wrap;
        gap: var(--space-sm);
        padding: var(--space-sm);
    }

    .product-info {
        flex: 1;
        min-width: 150px;
    }

    .product-price {
        font-size: 1rem;
    }

    .product-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: var(--space-xs);
    }

    /* Form adjustments */
    .form-row {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .import-actions {
        flex-direction: column;
    }

    /* Search adjustments */
    .search-container {
        padding: var(--space-sm) var(--space-md);
    }

    /* Toast adjustments */
    .toast-container {
        bottom: var(--space-md);
        right: var(--space-md);
        left: var(--space-md);
    }

    .toast {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .header-stats {
        width: 100%;
    }

    .stat-item {
        flex: 1;
    }

    .mobile-tabs {
        top: 0;
        position: relative;
    }

    .main-content {
        padding: var(--space-sm);
    }

    .panel-header {
        padding: var(--space-sm);
    }

    .panel-header h2 {
        font-size: 0.9rem;
    }

    .products-list {
        padding: var(--space-sm);
    }

    .product-card {
        padding: var(--space-sm);
    }

    .product-name {
        font-size: 0.9rem;
    }

    .product-price {
        font-size: 0.95rem;
    }
}

/* ==================== Loading Overlay ==================== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 20, 33, 0.9);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-container {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(217, 168, 66, 0.2);
    border-top: 4px solid var(--gold-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: var(--gold-500);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* ==================== Share Modal ==================== */
.share-modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 20, 33, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.share-modal {
    background: linear-gradient(135deg, #0d1421 0%, #1a1f35 100%);
    border: 1px solid rgba(217, 168, 66, 0.2);
    border-radius: 12px;
    padding: 32px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
}

.share-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--gold-500);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.share-modal-close:hover {
    transform: scale(1.2);
}

.share-modal h2 {
    color: var(--gold-500);
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.share-modal p {
    color: var(--text-300);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.share-link-container {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.share-link-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(217, 168, 66, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-100);
    font-size: 0.9rem;
    word-break: break-all;
}

.share-link-input:focus {
    outline: none;
    border-color: var(--gold-500);
    background: rgba(255, 255, 255, 0.08);
}

.btn-copy-link {
    background: var(--gold-500);
    color: #0d1421;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-copy-link:hover {
    background: var(--gold-400);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(217, 168, 66, 0.3);
}

.share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

.btn-share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(217, 168, 66, 0.1);
    border: 1px solid rgba(217, 168, 66, 0.2);
    border-radius: 8px;
    padding: 16px;
    color: var(--gold-500);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.9rem;
}

.btn-share-option:hover {
    background: rgba(217, 168, 66, 0.2);
    border-color: var(--gold-500);
    transform: translateY(-2px);
}

.btn-share-option svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 480px) {
    .share-modal {
        padding: 24px;
    }

    .share-modal h2 {
        font-size: 1.3rem;
    }

    .share-link-container {
        flex-direction: column;
    }

    .btn-copy-link {
        width: 100%;
    }

    .share-buttons {
        grid-template-columns: 1fr;
    }
}