/* CSS Variables & Reset */
:root {
    --primary: #dc2626; /* Deep Red for KTBS / Rock vibe */
    --primary-hover: #b91c1c;
    --primary-glow: rgba(220, 38, 38, 0.4);
    
    --accent: #f59e0b; /* Casino Gold */
    --accent-hover: #d97706;
    
    --bg-dark: #020617; /* Very Dark Slate */
    --bg-card: rgba(15, 23, 42, 0.65); /* Translucent Slate 900 */
    --bg-input: rgba(2, 6, 23, 0.5); /* Slate 950 */
    
    --text-main: #f8fafc; /* Slate 50 */
    --text-muted: #94a3b8; /* Slate 400 */
    
    --border-color: rgba(255, 255, 255, 0.1);
    --border-highlight: rgba(255, 255, 255, 0.2);
    
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --success: #10b981;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Ambient Stage Lighting Effects */
.ambient-light {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}

.light-red {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.3) 0%, transparent 70%);
}

.light-gold {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.2) 0%, transparent 70%);
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--text-main);
}

.hidden {
    display: none !important;
}

/* Reusable Glass Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Layout */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-header {
    padding: 40px 20px 30px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.event-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}

.event-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 600;
    color: var(--text-muted);
}

.main-content {
    flex: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 60px;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Hero Graphic */
.hero-graphic {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 30px;
    padding: 6px; /* border thickness effect */
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

/* Status Banner */
.status-banner {
    background: rgba(220, 38, 38, 0.9);
    backdrop-filter: blur(8px);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 25px -5px rgba(220, 38, 38, 0.4);
}

/* Winners Panel */
.winners-panel {
    text-align: center;
    padding: 40px 30px;
    margin-bottom: 30px;
    border-top: 4px solid var(--accent);
}

.winners-panel h3 {
    font-size: 1.75rem;
    margin-bottom: 12px;
    color: var(--accent);
}

.winners-panel p {
    font-size: 1.25rem;
    color: #ffffff;
    line-height: 1.5;
}

/* Countdown */
.countdown-container {
    padding: 30px;
    text-align: center;
    margin-bottom: 40px;
    border-top: 2px solid var(--accent);
}

.countdown-container h3 {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.timer-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.time-block span {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.time-block label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
    color: var(--text-muted);
    font-weight: 600;
}

.time-separator {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-top: -20px; /* Aligns with numbers, ignoring label */
}

/* Content Details */
.contest-details {
    margin-bottom: 40px;
}

.premium-callout {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 30px;
    border-left: 4px solid var(--primary);
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.1) 0%, rgba(15, 23, 42, 0.4) 100%);
}

.callout-icon {
    flex-shrink: 0;
    color: var(--primary);
    background: rgba(220, 38, 38, 0.15);
    padding: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.details-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-main);
    margin: 0;
}

.details-text strong {
    color: #ffffff;
    font-weight: 700;
}

/* Form Card */
.form-card {
    padding: 40px;
    margin-bottom: 40px;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: #ffffff;
}

.form-header p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    margin-bottom: 24px;
    flex: 1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

input {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: #ffffff;
    transition: all 0.2s ease;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(2, 6, 23, 0.8);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Buttons */
.btn-primary {
    display: block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--primary) 0%, #991b1b 100%);
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 1.15rem;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skewX(-20deg);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px -5px var(--primary-glow);
    filter: brightness(1.1);
}

.btn-primary:hover::after {
    left: 200%;
}

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

.btn-primary:disabled {
    background: #334155;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.btn-secondary {
    padding: 12px 24px;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* Error/Alert */
.error-alert {
    background-color: var(--error-bg);
    border: 1px solid var(--error);
    color: #fca5a5;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-weight: 600;
    text-align: center;
}

/* Rules Section */
.rules-section {
    margin-bottom: 40px;
    padding: 0;
    overflow: hidden;
}

.rules-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffffff;
    list-style: none; /* removes default triangle */
    transition: background 0.2s;
}

.rules-summary::-webkit-details-marker {
    display: none;
}

.rules-summary:hover {
    background: rgba(255,255,255,0.05);
}

.rules-section[open] .chevron {
    transform: rotate(180deg);
}

.rules-summary .chevron {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.rules-content {
    padding: 0 30px 30px 30px;
    font-size: 0.95rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 5px;
    padding-top: 20px;
}

.rules-content p {
    margin-bottom: 12px;
}

.rules-content p:last-child {
    margin-bottom: 0;
}

.rules-content strong {
    color: #cbd5e1;
}

/* Thank You Screen */
.thank-you-card {
    padding: 60px 40px;
    text-align: center;
    margin: 40px 0;
    border-top: 4px solid var(--success);
}

.icon-success {
    color: var(--success);
    margin-bottom: 24px;
    display: inline-flex;
    padding: 20px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
}

.thank-you-card h2 {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: #ffffff;
}

.success-subtitle {
    font-size: 1.25rem;
    color: var(--success);
    font-weight: 600;
    margin-bottom: 16px;
}

.success-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Share Panel */
.share-panel {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.share-header h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.share-header p {
    color: var(--text-muted);
}

.text-gold {
    color: var(--accent);
    font-size: 1.1em;
}

.share-input-group {
    display: flex;
    margin-top: 24px;
    gap: 12px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.share-input-group input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    color: #ffffff;
    font-family: monospace;
    font-size: 1.1rem;
}

/* Powered By Slot */
#wbx-powered-by-slot {
    margin-top: auto;
    padding-top: 40px;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header {
        padding: 30px 20px 20px;
    }
    
    .event-title {
        font-size: 2.25rem;
    }
    
    .form-card, .thank-you-card, .premium-callout {
        padding: 30px 20px;
    }
    
    .premium-callout {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        border-left: none;
        border-top: 4px solid var(--primary);
    }
    
    .timer-display {
        gap: 10px;
    }
    
    .time-block span {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .share-input-group {
        flex-direction: column;
    }
    
    .btn-secondary {
        width: 100%;
        padding: 14px;
    }
}
