/* Paramount+ Event Dashboard Styles */

/* CSS Variables - Paramount Color Palette */
:root {
    --paramount-blue: #0064FF;
    --paramount-dark-blue: #0037B3;
    --paramount-light-blue: #4D94FF;
    --paramount-black: #000000;
    --paramount-gray: #1A1A1A;
    --paramount-light-gray: #E5E5E5;
    --paramount-white: #FFFFFF;
    --bg-base: #0f0f1a;
    --card-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --border-blue: rgba(100, 150, 255, 0.5);
    --border-blue-light: rgba(0, 100, 255, 0.2);
    --text-muted: #a0a0a0;
    --text-secondary: #e0e0e0;
    --success-green: #00cc66;
    --danger-red: #ff4d4d;
}

/* Import Paramount+ style fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-base);
    color: var(--paramount-white);
    line-height: 1.6;
}

/* Main App Background with Mountain Image */
body {
    background: linear-gradient(rgba(15, 15, 26, 0.8), rgba(15, 15, 26, 0.8)),
                url('/static/images/moe-4.0-talent-one_paramountmountain_1930x800.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Container */
.container {
    max-width: 1560px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-blue-light);
    margin-bottom: 20px;
}

.header h1 {
    color: var(--paramount-white);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.5px;
}

.logout-btn {
    background: var(--card-gradient);
    border: 1px solid var(--border-blue-light);
    border-radius: 8px;
    color: var(--paramount-white);
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: linear-gradient(135deg, var(--paramount-blue) 0%, var(--paramount-dark-blue) 100%);
}

/* Section Headers */
h2, h3 {
    color: var(--paramount-blue);
    font-weight: 600;
}

/* Control Panel */
.control-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-group label {
    color: var(--paramount-white);
    font-size: 14px;
    font-weight: 500;
}

/* Form Elements */
select, input[type="date"], input[type="time"], input[type="text"], input[type="password"] {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-blue-light);
    border-radius: 8px;
    color: var(--paramount-white);
    padding: 10px 14px;
    font-size: 14px;
    width: 100%;
    transition: all 0.3s ease;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--paramount-blue);
    box-shadow: 0 0 0 2px rgba(0, 100, 255, 0.2);
}

select option {
    background: var(--paramount-gray);
    color: var(--paramount-white);
}

/* Buttons */
.btn {
    background: var(--card-gradient);
    border: 1px solid var(--border-blue-light);
    border-radius: 8px;
    color: var(--paramount-white);
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, var(--paramount-blue) 0%, var(--paramount-dark-blue) 100%);
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 100, 255, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(0, 100, 255, 0.6);
    transform: translateY(-2px);
}

.btn-download {
    background: var(--card-gradient);
    border: 1px solid var(--border-blue-light);
    color: var(--paramount-blue);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    background: var(--card-gradient);
    border-radius: 12px;
    padding: 6px;
    border: 1px solid var(--border-blue-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.tab {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 4px;
}

.tab:hover {
    color: var(--paramount-white);
    background: rgba(0, 100, 255, 0.15);
}

.tab.active {
    background: linear-gradient(135deg, var(--paramount-blue) 0%, var(--paramount-dark-blue) 100%);
    color: var(--paramount-white);
    box-shadow: 0 4px 12px rgba(0, 100, 255, 0.4);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Metric Cards */
.scorecard-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.metric-card {
    flex: 1;
    min-width: 100px;
    background: var(--card-gradient);
    border: 1px solid var(--border-blue);
    border-radius: 12px;
    padding: 16px 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.metric-value {
    color: var(--paramount-white);
    font-weight: 700;
    font-size: 22px;
}

.metric-change {
    font-weight: 600;
    font-size: 12px;
    margin-top: 4px;
}

.metric-change.positive {
    color: var(--success-green);
}

.metric-change.negative {
    color: var(--danger-red);
}

.metric-change.neutral {
    color: #888888;
}

.metric-label {
    color: var(--paramount-white);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

/* Charts */
.chart-container {
    background: var(--card-gradient);
    border: 1px solid var(--border-blue-light);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 16px;
    overflow: hidden;
    max-height: 380px;
}

/* Tables */
.table-container {
    background: var(--card-gradient);
    border: 1px solid var(--border-blue-light);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    overflow-x: auto;
}

/* Scrollable table container for hourly data */
.table-scrollable {
    max-height: 400px;
    overflow-y: scroll !important;
    overflow-x: auto !important;
    display: block;
}

/* Sticky header for scrollable tables */
.table-scrollable .data-table {
    display: table;
    width: 100%;
}

.table-scrollable .data-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-scrollable .data-table th {
    background: rgba(26, 26, 46, 0.98);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: rgba(0, 100, 255, 0.2);
    color: var(--paramount-white);
    font-weight: 600;
    text-align: left;
    padding: 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-blue-light);
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 14px;
}

.data-table tr:hover {
    background: rgba(0, 100, 255, 0.05);
}

.data-table .positive {
    color: var(--success-green);
    font-weight: 600;
}

.data-table .negative {
    color: var(--danger-red);
    font-weight: 600;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-label {
    color: var(--paramount-white);
    font-weight: 600;
    font-size: 14px;
}

.toggle {
    position: relative;
    width: 48px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--paramount-white);
    border: 1px solid var(--border-blue-light);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: var(--paramount-gray);
    transition: 0.3s;
    border-radius: 50%;
}

.toggle input:checked + .toggle-slider {
    background-color: var(--paramount-blue);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(24px);
    background-color: var(--paramount-white);
}

/* Info/Warning Messages */
.alert {
    background: var(--card-gradient);
    border: 1px solid var(--border-blue-light);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.alert-info {
    border-left: 4px solid var(--paramount-blue);
}

.alert-warning {
    border-left: 4px solid #ffaa00;
}

.alert-error {
    border-left: 4px solid var(--danger-red);
}

.alert-success {
    border-left: 4px solid var(--success-green);
}

/* Demo Mode Banner */
.demo-banner {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    padding: 8px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
    color: white;
    font-weight: 600;
}

/* Welcome Modal - Overlay Popup */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 26, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.welcome-modal {
    background: var(--card-gradient);
    border: 2px solid var(--paramount-blue);
    border-radius: 16px;
    padding: 40px 50px;
    max-width: 650px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 100, 255, 0.5), 0 0 60px rgba(0, 100, 255, 0.2);
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 15, 26, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-modal {
    background: var(--card-gradient);
    border: 2px solid var(--paramount-blue);
    border-radius: 16px;
    padding: 50px 60px;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 100, 255, 0.4), 0 0 80px rgba(0, 100, 255, 0.2);
    position: relative;
    overflow: hidden;
}

/* Ripple Rings Animation */
.ripple-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ripple-ring {
    position: absolute;
    border: 2px solid var(--paramount-blue);
    border-radius: 50%;
    animation: ripple 2s ease-out infinite;
}

.ripple-ring:nth-child(1) {
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.ripple-ring:nth-child(2) {
    width: 20px;
    height: 20px;
    animation-delay: 0.4s;
}

.ripple-ring:nth-child(3) {
    width: 20px;
    height: 20px;
    animation-delay: 0.8s;
}

.ripple-ring:nth-child(4) {
    width: 20px;
    height: 20px;
    animation-delay: 1.2s;
}

.ripple-center {
    width: 16px;
    height: 16px;
    background: var(--paramount-blue);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--paramount-blue), 0 0 40px rgba(0, 100, 255, 0.5);
    animation: centerPulse 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes ripple {
    0% {
        width: 20px;
        height: 20px;
        opacity: 1;
        border-width: 3px;
    }
    100% {
        width: 120px;
        height: 120px;
        opacity: 0;
        border-width: 1px;
    }
}

@keyframes centerPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 20px var(--paramount-blue), 0 0 40px rgba(0, 100, 255, 0.5);
    }
    50% {
        transform: scale(1.2);
        box-shadow: 0 0 30px var(--paramount-blue), 0 0 60px rgba(0, 100, 255, 0.7);
    }
}

.loading-text {
    color: var(--paramount-white);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.loading-subtext {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.loading-hint {
    color: var(--paramount-blue);
    font-size: 13px;
    margin-top: 10px;
}

/* Section Separator */
.separator {
    border: none;
    border-top: 1px solid var(--border-blue-light);
    margin: 20px 0;
}

/* Timezone Indicator */
.timezone-indicator {
    text-align: right;
    margin-bottom: 8px;
    font-size: 12px;
    color: #888;
}

.timezone-indicator strong {
    color: var(--paramount-blue);
}

/* Event Info Caption */
.event-caption {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
}

/* Table Controls Row */
.table-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 12px;
}

/* Flex utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }

/* Login Page Specific Styles */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-header-box {
    background-color: var(--paramount-white);
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.login-header-box img {
    max-width: 280px;
    height: auto;
    margin-bottom: 12px;
}

.login-header-box h1 {
    color: var(--paramount-black);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.login-form {
    background: var(--card-gradient);
    border: 1px solid var(--border-blue-light);
    border-radius: 12px;
    padding: 30px;
}

.login-form h2 {
    color: var(--paramount-white);
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form .btn {
    width: 100%;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .control-panel {
        grid-template-columns: 1fr;
    }

    .scorecard-row {
        flex-direction: column;
    }

    .metric-card {
        min-width: 100%;
    }

    .tabs {
        flex-direction: column;
        gap: 8px;
    }

    .tab {
        margin: 0;
    }
}

/* Hidden utility */
.hidden {
    display: none !important;
}
