/* Base Styles */
:root {
    --primary-color: #4527a0;
    --secondary-color: #7c4dff;
    --dark-bg: #0a1929;
    --light-text: #ffffff;
    --cta-color: #ff9100;
    --progress-bg: rgba(255, 255, 255, 0.2);
    --border-radius: 16px;
    --card-bg: rgba(25, 32, 71, 0.9);
    --gradient-start: #0a1929;
    --gradient-end: #192047;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --highlight-color: #00e5ff;
}

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

body {
    font-family: 'Sarabun', sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    background-attachment: fixed;
    color: var(--light-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%23ffffff10"/></svg>');
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}

.container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Hero Section */
.hero-section {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 20px;
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--highlight-color), var(--secondary-color));
}

.hero-section h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 20px 0 15px;
    line-height: 1.3;
    background: linear-gradient(90deg, var(--light-text), var(--highlight-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(0, 229, 255, 0.2);
}

.subheadline {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 25px;
    line-height: 1.5;
}

.ps5-image {
    width: 200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.5));
    transform: translateY(0);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.ps5-image img {
    width: 100%;
    height: auto;
}

.ps5-image-small {
    width: 120px;
    margin: 0 auto 15px;
}

.ps5-image-small img {
    width: 100%;
    height: auto;
}

/* Badge */
.badge-exclusive {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, var(--highlight-color), var(--secondary-color));
    color: var(--light-text);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 229, 255, 0.3);
    z-index: 2;
    letter-spacing: 0.5px;
}

/* Highlight */
.highlight {
    color: var(--highlight-color);
    font-weight: 600;
}

.highlight-number {
    color: var(--cta-color);
    font-weight: 700;
}

/* Countdown */
.countdown-container {
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--border-radius);
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.countdown-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.countdown-label {
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.countdown-icon {
    margin-right: 5px;
    font-style: normal;
    font-size: 16px;
}

.countdown {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-item span:first-child {
    font-size: 28px;
    font-weight: 700;
    color: var(--cta-color);
}

.countdown-item .countdown-label {
    font-size: 12px;
    margin-top: 5px;
}

.countdown-separator {
    font-size: 28px;
    font-weight: 700;
    margin-top: -10px;
}

.start-btn {
    background: linear-gradient(45deg, var(--cta-color), #ff6d00);
    color: #000;
    font-weight: 600;
    font-size: 16px;
    padding: 14px 32px;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(255, 145, 0, 0.4);
    letter-spacing: 0.5px;
}

.start-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s;
}

.start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 145, 0, 0.6);
}

.start-btn:hover::before {
    left: 100%;
}

.btn-arrow {
    display: inline-block;
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.start-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.participants-info {
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
}

/* Survey Container */
.survey-container {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 20px;
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* Header */
.header {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
}

.progress-container {
    height: 8px;
    background-color: var(--progress-bg);
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.question-counter {
    text-align: right;
    font-size: 14px;
    opacity: 0.7;
}

/* Content */
.content {
    position: relative;
    min-height: 350px;
}

.question-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 30px 20px;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.question-slide.active {
    display: flex;
    opacity: 1;
    z-index: 1;
}

h2 {
    font-size: 22px;
    margin-bottom: 30px;
    font-weight: 600;
    line-height: 1.4;
}

/* Options */
.options {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 15px;
}

.option-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--light-text);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Sarabun', sans-serif;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

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

.option-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.option-btn:hover::after {
    width: 100%;
}

.option-btn.selected {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-color: var(--secondary-color);
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(124, 77, 255, 0.3);
}

/* Loading Screen */
.loading-container {
    text-align: center;
}

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

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

/* Result Screen */
.result-container {
    text-align: center;
    padding: 20px 0;
    position: relative;
}

.result-header {
    margin-bottom: 15px;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #4caf50, #8bc34a);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: white;
    font-size: 30px;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4);
    animation: scale-in 0.5s ease-out;
}

@keyframes scale-in {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.result-message {
    margin: 15px 0;
    font-size: 16px;
    line-height: 1.5;
}

.prize-claim {
    margin-top: 20px;
}

.remaining-prizes {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: var(--border-radius);
    display: inline-block;
}

.prize-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.prize-label {
    font-size: 14px;
    opacity: 0.9;
}

.prize-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--cta-color);
    background: rgba(0, 0, 0, 0.3);
    padding: 3px 10px;
    border-radius: 5px;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(45deg, var(--cta-color), #ff6d00);
    color: #000;
    font-weight: 700;
    font-size: 18px;
    padding: 16px 36px;
    border-radius: var(--border-radius);
    text-decoration: none;
    margin-top: 25px;
    box-shadow: 0 5px 15px rgba(255, 145, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 145, 0, 0.6);
}

.cta-button:hover::before {
    left: 100%;
}

/* Urgency Text */
.urgency-text {
    margin-top: 15px;
    font-size: 16px;
    color: #ff5252;
    font-weight: 600;
    animation: pulse 2s infinite;
    background: rgba(255, 82, 82, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    border: 1px dashed rgba(255, 82, 82, 0.3);
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Timestamp */
.timestamp {
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.online-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #4caf50;
}

.online-dot {
    width: 8px;
    height: 8px;
    background-color: #4caf50;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 5px rgba(76, 175, 80, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

/* Trust Elements */
.trust-elements {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.trust-separator {
    opacity: 0.5;
}

.verified-badge {
    color: #4caf50;
    font-weight: 600;
    display: flex;
    align-items: center;
    background: rgba(76, 175, 80, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.flag {
    font-size: 18px;
}

/* Footer */
footer {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    opacity: 0.7;
    padding-bottom: 15px;
}

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

.footer-links span {
    margin-right: 5px;
}

.footer-links a {
    color: var(--light-text);
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Confetti Container */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .hero-section {
        padding: 20px 15px;
    }
    
    .hero-section h1 {
        font-size: 22px;
        margin: 15px 0 12px;
    }
    
    .subheadline {
        font-size: 15px;
        margin-bottom: 20px;
    }
    
    .countdown-container {
        margin: 15px 0;
        padding: 12px;
    }
    
    .countdown-item span:first-child {
        font-size: 24px;
    }
    
    .countdown-separator {
        font-size: 24px;
    }
    
    .start-btn {
        font-size: 15px;
        padding: 12px 24px;
    }
    
    h2 {
        font-size: 20px;
        margin-bottom: 25px;
    }
    
    .option-btn {
        padding: 14px 15px;
        font-size: 15px;
    }
    
    .cta-button {
        font-size: 16px;
        padding: 14px 25px;
    }
    
    .urgency-text {
        font-size: 14px;
        margin-top: 12px;
    }
    
    .content {
        min-height: 380px; /* Ensure enough space for all content */
    }
    
    .result-container {
        padding: 15px 0;
    }
    
    .footer-links {
        gap: 10px;
        font-size: 11px;
    }
}
