/* Reset และ Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.8;
    background: #0a0a0a;
    color: #4a4a4a;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 10px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    word-wrap: break-word;
    hyphens: auto;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(15, 0, 0, 0.2) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(10, 0, 0, 0.15) 0%, transparent 60%),
        linear-gradient(180deg, #000000 0%, #0d0d0d 50%, #000000 100%);
}

/* Fallback for missing background image */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
    z-index: -2;
}

/* Background image overlay effects */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255,107,53,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139,0,139,0.1) 0%, transparent 50%),
        linear-gradient(45deg, rgba(0,0,0,0.2) 0%, transparent 100%);
    z-index: -1;
    pointer-events: none;
    animation: backgroundPulse 10s ease-in-out infinite alternate;
}

@keyframes backgroundPulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* Container */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 15px;
    position: relative;
    background: rgba(0,0,0,0.8);
    border: 1px solid #1a1a1a;
    box-shadow: 
        inset 0 0 50px rgba(0,0,0,0.9),
        0 0 20px rgba(0,0,0,0.8);
    opacity: 1;
    visibility: visible;
    display: block;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.container.show {
    opacity: 1;
    visibility: visible;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px 0;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: #333333;
    font-weight: 400;
    letter-spacing: 3px;
    line-height: 1.2;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
    animation: subtleGlow 4s ease-in-out infinite alternate;
}

header p {
    color: #777;
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.8;
    text-align: center;
    margin-bottom: 20px;
    padding: 0 20px;
    font-style: italic;
    word-spacing: 0.2em;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.subtitle-scary {
    color: #3a3a3a !important;
    font-size: 0.8rem !important;
    margin-top: 12px;
    line-height: 1.4;
    text-align: center;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
    animation: darkPulse 3s ease-in-out infinite;
}

/* Event Cards */
.event-card {
    background: 
        linear-gradient(135deg, rgba(8,8,8,0.95) 0%, rgba(15,15,15,0.9) 100%);
    border: 1px solid #1a1a1a;
    padding: 25px 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    box-shadow: 
        inset 0 1px 0 rgba(40,40,40,0.1),
        0 1px 3px rgba(0,0,0,0.8);
}

.scary-card {
    background: linear-gradient(135deg, rgba(5,5,5,0.98) 0%, rgba(12,12,12,0.95) 100%);
    border: 1px solid #0d0d0d;
    box-shadow: 
        inset 0 0 15px rgba(0,0,0,0.8),
        0 1px 2px rgba(0,0,0,0.6);
}

.danger-text {
    color: #505050;
    font-size: 0.9rem;
    font-style: italic;
    margin: 15px 0 20px 0;
    line-height: 1.6;
    text-align: left;
    padding: 0 20px;
    letter-spacing: 0.3px;
    word-spacing: 0.1em;
    text-indent: 0.5em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.event-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: #3d3d3d;
    font-weight: 500;
    line-height: 1.3;
    text-align: center;
    letter-spacing: 0.5px;
}

.event-card p {
    color: #bbb;
    margin-bottom: 20px;
    line-height: 1.7;
    text-align: left;
    font-size: 1rem;
    padding: 0 15px;
    word-spacing: 0.1em;
    text-indent: 1em;
}

/* Buttons */
.btn-primary, .btn-claim {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(145deg, #ff6b35, #f7931e);
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
    line-height: 1.3;
    text-align: center;
}

.scary-btn {
    background: linear-gradient(145deg, #8B0000, #DC143C) !important;
    border: 2px solid #ff0000 !important;
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255,0,0,0.8) !important;
    box-shadow: 0 0 20px rgba(255,0,0,0.4) !important;
    animation: buttonGlow 2s ease-in-out infinite alternate !important;
}

.scary-btn:hover {
    background: linear-gradient(145deg, #DC143C, #FF0000) !important;
    transform: translateY(-3px) scale(1.05) !important;
    box-shadow: 0 10px 30px rgba(255,0,0,0.6) !important;
}

.btn-primary:hover, .btn-claim:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,107,53,0.4);
}

.btn-claim {
    background: linear-gradient(145deg, #28a745, #20c997);
    font-size: 1.1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Knowledge Section */
.knowledge-section {
    background: linear-gradient(135deg, rgba(8,8,8,0.95) 0%, rgba(15,15,15,0.9) 100%);
    border: 1px solid #1a1a1a;
    padding: 20px;
    margin: 25px 0;
    text-align: center;
    box-shadow: 
        inset 0 1px 0 rgba(40,40,40,0.1),
        0 1px 3px rgba(0,0,0,0.8);
}

.knowledge-section h3 {
    color: #444444;
    font-size: 1.3rem;
    margin-bottom: 12px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 1px;
}

.section-desc {
    color: #666666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.4;
    font-style: italic;
}

.knowledge-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
}

.knowledge-btn {
    background: #0a0a0a;
    color: #777777;
    border: 1px solid #2a2a2a;
    padding: 14px 12px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.knowledge-btn:hover {
    background: #151515;
    color: #999999;
}
        inset 0 0 20px rgba(139,0,0,0.3) !important;
    animation: cursedGlow 3s ease-in-out infinite alternate !important;
    position: relative;
    overflow: hidden;
}

.cursed-offer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, transparent, rgba(255,0,0,0.1), transparent);
    animation: cursedRotate 6s linear infinite;
    pointer-events: none;
}

.curse-text {
    color: #ff0000 !important;
    font-size: 1.1rem !important;
    text-shadow: 0 0 15px rgba(255,0,0,0.8) !important;
    animation: cursedText 2s ease-in-out infinite alternate !important;
}

.warning-timer {
    color: #ffff00 !important;
    font-weight: bold !important;
    text-shadow: 0 0 10px rgba(255,255,0,0.8) !important;
}

.small-print {
    font-size: 0.7rem !important;
    color: #888 !important;
    margin-top: 10px !important;
    font-style: italic !important;
}

.cursed-btn {
    background: linear-gradient(145deg, #000000, #8B0000, #000000) !important;
    border: 2px solid #ff0000 !important;
    color: #fff !important;
    text-shadow: 0 0 15px rgba(255,0,0,1) !important;
    box-shadow: 0 0 30px rgba(255,0,0,0.6) !important;
    animation: cursedButtonPulse 1.5s ease-in-out infinite !important;
}

@keyframes glow {
    from { box-shadow: 0 8px 32px rgba(220,38,38,0.3); }
    to { box-shadow: 0 8px 32px rgba(220,38,38,0.6), 0 0 20px rgba(251,191,36,0.3); }
}

.special-offer h3 {
    color: #fbbf24;
    margin-bottom: 10px;
}

#countdown {
    color: #fbbf24;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Comments Section */
.comments-section {
    margin: 40px 0;
    padding: 25px;
    background: linear-gradient(145deg, rgba(45,45,68,0.9), rgba(30,30,47,0.85));
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,107,53,0.3);
    backdrop-filter: blur(15px);
}

.haunted-form {
    background: linear-gradient(145deg, #000000, #1a0000) !important;
    border: 2px solid #8B0000 !important;
    border-radius: 10px !important;
    box-shadow: 
        0 0 20px rgba(255,0,0,0.4),
        inset 0 0 15px rgba(139,0,0,0.2) !important;
    animation: hauntedPulse 4s ease-in-out infinite !important;
}

.haunted-form h3 {
    color: #ff0000 !important;
    text-shadow: 0 0 20px rgba(255,0,0,1) !important;
    animation: hauntedTitle 3s ease-in-out infinite alternate !important;
}

.haunted-form input,
.haunted-form textarea {
    background: rgba(0,0,0,0.8) !important;
    border: 1px solid #8B0000 !important;
    color: #fff !important;
    box-shadow: inset 0 0 10px rgba(255,0,0,0.2) !important;
}

.haunted-form input:focus,
.haunted-form textarea:focus {
    border-color: #ff0000 !important;
    box-shadow: 0 0 15px rgba(255,0,0,0.6) !important;
}

.cursed-comments {
    background: linear-gradient(145deg, #000000, #1a0000) !important;
    border: 2px solid #8B0000 !important;
    border-radius: 10px !important;
    padding: 20px !important;
    box-shadow: 
        0 0 25px rgba(255,0,0,0.4),
        inset 0 0 15px rgba(139,0,0,0.2) !important;
    animation: cursedFlicker 5s ease-in-out infinite !important;
}

.cursed-comments h3 {
    color: #ff0000 !important;
    text-shadow: 0 0 20px rgba(255,0,0,1) !important;
    margin-bottom: 20px !important;
}

.comment {
    background: rgba(0,0,0,0.6) !important;
    border: 1px solid #8B0000 !important;
    border-radius: 8px !important;
    padding: 15px !important;
    margin-bottom: 15px !important;
    box-shadow: 0 0 10px rgba(255,0,0,0.2) !important;
}

.comment strong {
    color: #ffaa00 !important;
    text-shadow: 0 0 10px rgba(255,170,0,0.8) !important;
}

.comments-section h3 {
    color: #777777;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 1px;
    line-height: 1.2;
}

.comment-form {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.4;
    resize: vertical;
}

.comment-form input::placeholder,
.comment-form textarea::placeholder {
    color: #bbb;
}

.comment-form textarea {
    min-height: 80px;
    font-family: inherit;
}

.reaction-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.reaction-btn {
    padding: 8px 12px;
    border: 2px solid transparent;
    border-radius: 20px;
    background: rgba(255,107,53,0.2);
    color: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.reaction-btn:hover {
    background: rgba(255,107,53,0.4);
    border-color: #ff6b35;
}

.reaction-btn.selected {
    background: #ff6b35;
    border-color: #ff6b35;
    transform: scale(1.1);
}

/* Skull Rating System */
.skull-rating-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
    margin: 15px 0 !important;
    padding: 10px !important;
}

.skull-btn {
    background: linear-gradient(145deg, #000000, #2d0000) !important;
    border: 2px solid #444 !important;
    color: #666 !important;
    padding: 8px 12px !important;
    border-radius: 50% !important;
    font-size: 1.2rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    min-width: 45px !important;
    min-height: 45px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.skull-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,0,0,0.3), transparent);
    transition: left 0.5s ease;
}

.skull-btn:hover {
    transform: translateY(-2px) scale(1.1) !important;
    border-color: #ff6600 !important;
    color: #ffaa00 !important;
    box-shadow: 0 0 15px rgba(255,170,0,0.4) !important;
}

.skull-btn:hover::before {
    left: 100%;
}

.skull-btn.active {
    background: linear-gradient(145deg, #8B0000, #ff0000) !important;
    border-color: #ff0000 !important;
    color: #fff !important;
    text-shadow: 0 0 10px rgba(255,0,0,0.8) !important;
    box-shadow: 0 0 20px rgba(255,0,0,0.6) !important;
    animation: activeSkullGlow 2s ease-in-out infinite alternate !important;
}

.skull-btn.active:hover {
    transform: translateY(-2px) scale(1.15) !important;
    box-shadow: 0 0 25px rgba(255,0,0,0.8) !important;
}

/* Different glow intensity based on rating */
.skull-btn[data-rating="1"].active {
    box-shadow: 0 0 10px rgba(255,255,255,0.3) !important;
    border-color: #666 !important;
    animation: none !important;
}

.skull-btn[data-rating="2"].active {
    box-shadow: 0 0 15px rgba(255,170,0,0.5) !important;
    border-color: #ffaa00 !important;
}

.skull-btn[data-rating="3"].active {
    box-shadow: 0 0 20px rgba(255,102,0,0.6) !important;
    border-color: #ff6600 !important;
}

.skull-btn[data-rating="4"].active {
    box-shadow: 0 0 25px rgba(255,51,0,0.7) !important;
    border-color: #ff3300 !important;
}

.skull-btn[data-rating="5"].active {
    box-shadow: 0 0 30px rgba(255,0,0,0.9) !important;
    border-color: #ff0000 !important;
    animation: maxActiveSkullGlow 1.5s ease-in-out infinite alternate !important;
}

@keyframes activeSkullGlow {
    0% { 
        box-shadow: 0 0 15px rgba(255,0,0,0.4);
        text-shadow: 0 0 8px rgba(255,0,0,0.6);
    }
    100% { 
        box-shadow: 0 0 25px rgba(255,0,0,0.8);
        text-shadow: 0 0 12px rgba(255,0,0,1);
    }
}

@keyframes maxActiveSkullGlow {
    0% { 
        box-shadow: 0 0 30px rgba(255,0,0,0.8);
        text-shadow: 0 0 15px rgba(255,0,0,1);
    }
    100% { 
        box-shadow: 0 0 45px rgba(255,0,0,1), 0 0 60px rgba(255,0,0,0.6);
        text-shadow: 0 0 25px rgba(255,0,0,1), 0 0 35px rgba(255,0,0,0.8);
    }
}

.btn-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(145deg, #28a745, #20c997);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40,167,69,0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Comments List */
.comments-list {
    max-height: 400px;
    overflow-y: auto;
}

.loading-comments {
    text-align: center;
    color: #bbb;
    padding: 20px;
    font-style: italic;
}

.comment-item {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    border-left: 4px solid #ff6b35;
    animation: slideIn 0.3s ease-out;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.delete-btn {
    background: linear-gradient(145deg, #dc2626, #991b1b);
    border: 1px solid #ff4444;
    color: #fff;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.delete-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255,68,68,0.5);
    background: linear-gradient(145deg, #ff4444, #dc2626);
}

.delete-btn:active {
    transform: scale(0.95);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
}

.load-more-btn {
    background: linear-gradient(145deg, #2d1b69, #1e1b4b);
    border: 2px solid #8B5A2B;
    color: #fff;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px rgba(255,170,0,0.8);
    box-shadow: 0 0 15px rgba(139,90,43,0.4);
    animation: loadMorePulse 3s ease-in-out infinite;
}

.load-more-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 0 25px rgba(139,90,43,0.6);
    background: linear-gradient(145deg, #3d2b79, #2e2b5b);
    border-color: #ffaa00;
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    animation: loadingSpinner 1s linear infinite;
}

@keyframes loadMorePulse {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(139,90,43,0.4);
        text-shadow: 0 0 10px rgba(255,170,0,0.8);
    }
    50% { 
        box-shadow: 0 0 25px rgba(139,90,43,0.8);
        text-shadow: 0 0 15px rgba(255,170,0,1);
    }
}

@keyframes loadingSpinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.comments-stats {
    color: #bbb;
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-align: center;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    border: 1px solid rgba(255,107,53,0.2);
}

.all-loaded-message {
    color: #ff6b35;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    padding: 15px;
    background: linear-gradient(145deg, rgba(255,107,53,0.1), rgba(255,107,53,0.05));
    border: 2px solid rgba(255,107,53,0.3);
    border-radius: 15px;
    text-shadow: 0 0 10px rgba(255,107,53,0.6);
    animation: allLoadedGlow 2s ease-in-out infinite alternate;
}

@keyframes allLoadedGlow {
    0% { 
        text-shadow: 0 0 10px rgba(255,107,53,0.6);
        border-color: rgba(255,107,53,0.3);
    }
    100% { 
        text-shadow: 0 0 20px rgba(255,107,53,1);
        border-color: rgba(255,107,53,0.6);
    }
}

/* Flying Comments System */
.flying-comments-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1000; /* เพิ่ม z-index ให้สูงขึ้น */
    overflow: hidden;
    background: transparent;
}

.flying-comment {
    position: absolute;
    background: linear-gradient(145deg, rgba(0,0,0,0.95), rgba(45,45,68,0.98));
    border: 3px solid rgba(255,107,53,0.9);
    border-radius: 15px;
    padding: 12px 18px;
    color: #fff;
    font-size: 1.1rem;
    white-space: nowrap;
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: all;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 30px rgba(255,107,53,0.8), 0 0 60px rgba(255,107,53,0.4);
    backdrop-filter: blur(15px);
    z-index: 1001;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flying-reaction {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.flying-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.flying-author {
    color: #ff6b35;
    font-size: 0.9rem;
    text-shadow: 0 0 5px rgba(255,107,53,0.6);
}

.flying-message {
    color: #fff;
    font-size: 1rem;
    text-shadow: 0 0 3px rgba(255,255,255,0.3);
}

.flying-comment:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(255,107,53,0.8);
    z-index: 102;
}

.flying-comment.clicked {
    animation: none !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(1.2) !important;
    background: linear-gradient(145deg, rgba(0,0,0,0.95), rgba(45,45,68,0.95)) !important;
    border-color: #ff6b35 !important;
    box-shadow: 0 0 40px rgba(255,107,53,1) !important;
    max-width: 80vw !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    z-index: 200 !important;
    padding: 15px 20px !important;
    font-size: 1.1rem !important;
}

.flying-comment.clicked::after {
    content: '👻 คลิกอีกครั้งเพื่อปิด 👻';
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #ffaa00;
    text-align: center;
}

.flying-comment .comment-author {
    color: #ff6b35;
    font-weight: bold;
    margin-right: 5px;
}

.flying-comment .comment-reaction {
    margin-right: 5px;
}

/* Flying Animations */
@keyframes flyRight {
    0% { 
        left: -400px; 
        opacity: 0; 
    }
    10% { 
        opacity: 1; 
    }
    90% { 
        opacity: 1; 
    }
    100% { 
        left: 100vw; 
        opacity: 0; 
    }
}

@keyframes flyLeft {
    0% { 
        right: -400px; 
        opacity: 0; 
    }
    10% { 
        opacity: 1; 
    }
    90% { 
        opacity: 1; 
    }
    100% { 
        right: 100vw; 
        opacity: 0; 
    }
}

@keyframes flyDiagonal {
    0% { 
        left: -400px; 
        top: 80%; 
        opacity: 0; 
    }
    10% { 
        opacity: 1; 
    }
    90% { 
        opacity: 1; 
    }
    100% { 
        left: 100vw; 
        top: 10%; 
        opacity: 0; 
    }
}

@keyframes flyZigzag {
    0% { left: -400px; top: 60%; opacity: 0; }
    10% { opacity: 1; }
    25% { left: 25vw; top: 30%; }
    50% { left: 50vw; top: 70%; }
    75% { left: 75vw; top: 20%; }
    90% { opacity: 1; }
    100% { left: 100vw; top: 50%; opacity: 0; }
}

@keyframes flyBounce {
    0% { 
        left: -400px; 
        top: 40%; 
        opacity: 0; 
    }
    10% { 
        opacity: 1; 
    }
    20% { top: 20%; }
    40% { top: 60%; }
    60% { top: 15%; }
    80% { top: 55%; }
    90% { 
        opacity: 1; 
    }
    100% { 
        left: 100vw; 
        top: 35%; 
        opacity: 0; 
    }
}

/* Mobile Responsive for Flying Comments */
@media (max-width: 768px) {
    .flying-comment {
        font-size: 0.8rem;
        padding: 6px 10px;
        max-width: 250px;
    }
    
    .flying-comment.clicked {
        max-width: 90vw !important;
        font-size: 1rem !important;
        padding: 12px 15px !important;
    }
    
    /* Slower animations on mobile for better readability */
    .flying-comment {
        animation-duration: 10s !important;
    }
}

@media (max-width: 480px) {
    .flying-comment {
        font-size: 0.7rem;
        padding: 4px 8px;
        max-width: 200px;
    }
    
    .flying-comment.clicked {
        max-width: 95vw !important;
        font-size: 0.9rem !important;
        padding: 10px 12px !important;
    }
}

.comment-author {
    color: #ff6b35;
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-date {
    color: #888;
    font-size: 0.75rem;
}

.comment-reaction {
    font-size: 1.2rem;
    margin-right: 5px;
}

.comment-text {
    color: #ddd;
    line-height: 1.4;
    margin-bottom: 8px;
}

.comment-stats {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #aaa;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scrollbar styling */
.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 3px;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    color: #666;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.cursed-footer {
    background: linear-gradient(145deg, #000000, #1a0000) !important;
    border-top: 3px solid #8B0000 !important;
    padding: 30px 0 !important;
    box-shadow: 
        0 -10px 30px rgba(255,0,0,0.3),
        inset 0 0 20px rgba(139,0,0,0.2) !important;
    animation: cursedFooterPulse 4s ease-in-out infinite !important;
}

.cursed-footer p {
    color: #ff0000 !important;
    text-shadow: 0 0 15px rgba(255,0,0,0.8) !important;
    font-size: 1.2rem !important;
    line-height: 1.4;
    letter-spacing: 0.5px;
    text-align: center;
    margin: 8px 0;
    animation: cursedFooterText 3s ease-in-out infinite alternate !important;
}

.cursed-footer .small {
    font-size: 0.85rem !important;
    color: #999 !important;
    text-shadow: none !important;
    animation: none !important;
    line-height: 1.3;
    font-style: italic;
}

/* Visitor Counter */
.visitor-counter {
    margin: 20px 0;
    padding: 15px;
    background: rgba(10,10,10,0.8);
    border: 1px solid #1a1a1a;
    box-shadow: 
        inset 0 0 10px rgba(0,0,0,0.8),
        0 1px 3px rgba(0,0,0,0.6);
}

.counter-text {
    color: #777777 !important;
    font-size: 1rem !important;
    font-weight: 400 !important;
    margin: 8px 0 !important;
    text-align: center;
    line-height: 1.4;
    letter-spacing: 0.5px;
}

.visitor-number {
    color: #bbbbbb !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    text-align: center;
    letter-spacing: 1px;
    transition: all 0.3s ease !important;
    text-shadow: 0 0 10px rgba(187,187,187,0.3) !important;
}

.visitor-number.count-updated {
    color: #ffffff !important;
    transform: scale(1.05) !important;
    text-shadow: 0 0 15px rgba(255,255,255,0.6) !important;
}

.counter-subtitle {
    color: #777777 !important;
    font-size: 0.85rem !important;
    margin: 8px 0 !important;
    text-align: center !important;
    line-height: 1.4 !important;
}

.counter-details {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #222;
}

.counter-stat {
    flex: 1;
    text-align: center;
}

.stat-label {
    display: block;
    color: #444444;
    font-size: 0.7rem;
    margin-bottom: 2px;
}

.stat-value {
    display: block;
    color: #777777;
    font-size: 0.85rem;
    font-weight: 500;
}

.count-updated {
    animation: countUpdate 0.8s ease-out !important;
}

@keyframes subtleCounterUpdate {
    0% { 
        opacity: 0.8;
    }
    50% { 
        opacity: 1;
    }
    100% { 
        opacity: 0.8;
    }
}

@keyframes countUpdate {
    0% { 
        background-color: rgba(50,50,50,0.2);
    }
    50% { 
        background-color: rgba(80,80,80,0.3);
    }
    100% { 
        background-color: transparent;
    }
}
}

.visitor-number.count-updated {
    animation: countUpdate 1s ease-out !important;
}

@keyframes countUpdate {
    0% { 
        transform: scale(1);
        color: #ff6b35;
    }
    50% { 
        transform: scale(1.2);
        color: #ffaa00;
        text-shadow: 0 0 30px rgba(255,170,0,1), 0 0 50px rgba(255,107,53,0.8);
    }
    100% { 
        transform: scale(1);
        color: #ff6b35;
        text-shadow: 0 0 15px rgba(255,107,53,1);
    }
}

/* Mobile responsiveness for visitor counter */
@media (max-width: 768px) {
    .visitor-counter {
        padding: 10px;
        margin: 15px 0;
    }
    
    .counter-text {
        font-size: 0.9rem !important;
    }
    
    .visitor-number {
        font-size: 1.1rem !important;
    }
    
    .counter-subtitle {
        font-size: 0.7rem !important;
    }
}

.developer-credit {
    font-size: 0.9rem !important;
    color: #ff6b35 !important;
    text-shadow: 0 0 10px rgba(255,107,53,0.6) !important;
    margin-top: 10px !important;
    font-weight: bold !important;
    animation: developerGlow 3s ease-in-out infinite alternate !important;
}

@keyframes developerGlow {
    0% { 
        text-shadow: 0 0 10px rgba(255,107,53,0.6);
        color: #ff6b35;
    }
    100% { 
        text-shadow: 0 0 20px rgba(255,107,53,1), 0 0 30px rgba(255,107,53,0.5);
        color: #ffaa00;
    }
}

/* Jumpscare Overlay */
.jumpscare-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        linear-gradient(135deg, rgba(0,0,0,0.95) 0%, rgba(15,15,35,0.9) 50%, rgba(0,0,0,0.98) 100%),
        url('BG.jpeg');
    background-size: cover;
    background-position: center center;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.jumpscare-overlay.show {
    display: flex;
}

.jumpscare-content {
    text-align: center;
    color: #fff;
}

.ghost-img {
    width: 150px;
    height: 150px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.jumpscare-content h2 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #ff6b35;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
}



@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

/* Ghost Container */
.ghost-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    max-height: none !important;
}

.fullscreen-ghost {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: ghostInstantAppear 0.1s ease-out forwards;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    max-height: none !important;
    z-index: 10001;
}

.fullscreen-ghost.image-loaded {
    animation: ghostInstantAppear 0.1s ease-out forwards;
}

.fullscreen-ghost-image {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    max-height: none !important;
    filter: 
        brightness(1.1)
        contrast(1.4)
        saturate(1.2);
    animation: imageIntense 2s ease-in-out infinite;
    z-index: 10002;
}

/* Scary Fallback Styles */
.scary-fallback {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(45deg, #000 0%, #330000 50%, #000 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    animation: fallbackPulse 1s ease-in-out infinite;
}

.scary-text-large {
    font-size: min(20vw, 150px);
    font-weight: 900;
    color: #ff0000;
    text-shadow: 
        0 0 20px #ff0000,
        0 0 40px #ff0000,
        0 0 60px #ff0000;
    margin-bottom: 20px;
    animation: textGlow 1s ease-in-out infinite alternate;
}

.scary-text-medium {
    font-size: min(8vw, 60px);
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 15px #ffffff;
    margin-bottom: 15px;
}

.scary-text-small {
    font-size: min(6vw, 40px);
    font-weight: 600;
    color: #ff6b35;
    text-shadow: 0 0 10px #ff6b35;
}

.floating-ghost-image {
    max-width: 60px;
    max-height: 60px;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.6);
    filter: 
        drop-shadow(0 0 10px rgba(255, 107, 53, 0.4))
        brightness(1.1);
}

.ghost-angry {
    animation: ghostFloat 2s ease-in-out infinite;
    color: #ff4444;
}

.ghost-angry .ghost-image {
    animation: imageFloat 2s ease-in-out infinite;
    filter: 
        drop-shadow(0 0 25px rgba(255, 68, 68, 0.8))
        brightness(1.3)
        contrast(1.4)
        hue-rotate(20deg);
}

.ghost-scary {
    animation: ghostPulse 1s ease-in-out infinite, ghostFloat 2s ease-in-out infinite;
    color: #8b0000;
}

.ghost-scary .ghost-image {
    animation: imagePulse 1s ease-in-out infinite, imageFloat 2s ease-in-out infinite;
    filter: 
        drop-shadow(0 0 35px rgba(139, 0, 0, 0.9))
        brightness(1.1)
        contrast(1.6)
        saturate(1.3);
}

.ghost-creepy {
    animation: ghostTwist 3s linear infinite, ghostFloat 2s ease-in-out infinite;
    color: #4b0082;
}

.ghost-creepy .ghost-image {
    animation: imageTwist 3s linear infinite, imageFloat 2s ease-in-out infinite;
    filter: 
        drop-shadow(0 0 30px rgba(75, 0, 130, 0.8))
        brightness(0.9)
        contrast(1.5)
        hue-rotate(-30deg);
}

/* Floating Ghosts */
.floating-ghosts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 500;
}

.floating-ghost {
    position: absolute;
    font-size: 2rem;
    opacity: 0.7;
    animation: floatAcross 8s linear infinite;
    z-index: 500;
}

.ghost-1 { animation: floatAcross 8s linear infinite; }
.ghost-2 { animation: floatDiagonal 10s linear infinite; }
.ghost-3 { animation: floatZigzag 12s linear infinite; }
.ghost-4 { animation: floatSpin 6s linear infinite; }
.ghost-5 { animation: floatBounce 7s ease-in-out infinite; }

/* Ghost Animations */
@keyframes ghostFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes imageFloat {
    0%, 100% { 
        transform: translateY(0px) scale(1);
        filter: 
            drop-shadow(0 0 20px rgba(255, 107, 53, 0.6))
            brightness(1.2)
            contrast(1.3);
    }
    50% { 
        transform: translateY(-20px) scale(1.05);
        filter: 
            drop-shadow(0 0 30px rgba(255, 107, 53, 0.8))
            brightness(1.4)
            contrast(1.5);
    }
}



@keyframes ghostPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes ghostTwist {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes floatAcross {
    0% { 
        left: -100px; 
        top: 20%; 
    }
    100% { 
        left: 100vw; 
        top: 20%; 
    }
}

@keyframes floatDiagonal {
    0% { 
        left: -100px; 
        top: 80%; 
    }
    100% { 
        left: 100vw; 
        top: 10%; 
    }
}

@keyframes floatZigzag {
    0% { left: -100px; top: 50%; }
    25% { left: 25vw; top: 20%; }
    50% { left: 50vw; top: 70%; }
    75% { left: 75vw; top: 30%; }
    100% { left: 100vw; top: 60%; }
}

@keyframes floatSpin {
    0% { 
        left: -100px; 
        top: 40%; 
        transform: rotate(0deg); 
    }
    100% { 
        left: 100vw; 
        top: 40%; 
        transform: rotate(1080deg); 
    }
}

@keyframes floatBounce {
    0%, 100% { 
        left: -100px; 
        top: 60%; 
    }
    20% { left: 20vw; top: 30%; }
    40% { left: 40vw; top: 70%; }
    60% { left: 60vw; top: 20%; }
    80% { left: 80vw; top: 80%; }
    100% { left: 100vw; top: 50%; }
}

/* Smoke Particles */
.smoke-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10; /* เพิ่ม z-index ให้เห็น */
    overflow: hidden;
}

.smoke-particle {
    position: absolute;
    background: radial-gradient(circle, rgba(150,150,150,0.8), rgba(100,100,100,0.5), transparent);
    border-radius: 50%;
    pointer-events: none;
    animation: smokeRise linear infinite;
    filter: blur(1px);
    z-index: 5;
}

.smoke-particle.dark {
    background: radial-gradient(circle, rgba(20,20,20,0.8), rgba(40,40,40,0.4), transparent);
    filter: blur(3px);
}

.smoke-particle.red {
    background: radial-gradient(circle, rgba(80,20,20,0.6), rgba(60,10,10,0.3), transparent);
    filter: blur(2px);
}

.smoke-particle.cursed {
    background: radial-gradient(circle, rgba(139,0,0,0.7), rgba(80,0,0,0.4), transparent);
    filter: blur(1px);
    box-shadow: 0 0 10px rgba(255,0,0,0.2);
}

@keyframes smokeRise {
    0% {
        transform: translateY(0px) translateX(0px) scale(0.3);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    50% {
        opacity: 0.5;
        transform: translateY(-50vh) translateX(calc(var(--drift) * 0.5)) scale(1);
    }
    90% {
        opacity: 0.2;
    }
    100% {
        transform: translateY(-100vh) translateX(var(--drift)) scale(1.5);
        opacity: 0;
    }
}

@keyframes smokeDrift {
    0%, 100% { transform: translateX(0px); }
    50% { transform: translateX(var(--drift-distance)); }
}

/* Cursed smoke for special areas */
.cursed-offer {
    position: relative;
}

.cursed-offer::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to right, transparent, rgba(139,0,0,0.2), transparent);
    animation: cursedSmoke 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes cursedSmoke {
    0%, 100% { 
        opacity: 0.2;
        transform: translateY(0px);
    }
    50% { 
        opacity: 0.6;
        transform: translateY(-10px);
    }
}

.haunted-form {
    position: relative;
}

.haunted-form::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 30px;
    background: radial-gradient(ellipse at center, rgba(80,80,80,0.3), transparent);
    animation: hauntedMist 6s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes hauntedMist {
    0%, 100% { 
        opacity: 0.1;
        transform: scaleX(0.8);
    }
    50% { 
        opacity: 0.4;
        transform: scaleX(1.2);
    }
}

/* Fake Spider */
.fake-spider {
    position: fixed;
    font-size: 2rem;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fake-spider.show {
    opacity: 1;
    animation: crawl 4s linear infinite;
}

@keyframes crawl {
    0% { 
        top: -50px; 
        left: 10%; 
        transform: rotate(0deg); 
    }
    25% { 
        top: 20%; 
        left: 80%; 
        transform: rotate(90deg); 
    }
    50% { 
        top: 60%; 
        left: 20%; 
        transform: rotate(180deg); 
    }
    75% { 
        top: 80%; 
        left: 90%; 
        transform: rotate(270deg); 
    }
    100% { 
        top: -50px; 
        left: 50%; 
        transform: rotate(360deg); 
    }
}

/* Fake Loading */
.fake-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 8888;
}

.fake-loading.show {
    display: flex;
}

.loading-content {
    text-align: center;
    color: #fff;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #333;
    border-top: 5px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Audio Controls */
.audio-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.9);
    padding: 15px;
    border-radius: 15px;
    border: 2px solid rgba(255,107,53,0.5);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.music-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #ff6b35;
    background: linear-gradient(145deg, #2d2d44, #1e1e2f);
    color: #ff6b35;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255,107,53,0.5);
}

.music-toggle.playing {
    animation: pulse 2s infinite;
    background: linear-gradient(145deg, #ff6b35, #f7931e);
    color: white;
}

.music-toggle.paused {
    opacity: 0.6;
}

.volume-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

#volumeSlider {
    width: 80px;
    height: 4px;
    border-radius: 2px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    writing-mode: bt-lr; /* IE */
    -webkit-writing-mode: vertical-rl;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

#volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff6b35;
    cursor: pointer;
    transition: all 0.3s ease;
}

#volumeSlider::-webkit-slider-thumb:hover {
    background: #f7931e;
    transform: scale(1.2);
}

#volumeSlider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff6b35;
    cursor: pointer;
    border: none;
}

#volumeIcon {
    font-size: 1.2rem;
    color: #ff6b35;
    transition: all 0.3s ease;
}

.volume-muted #volumeIcon {
    opacity: 0.4;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
}

/* Audio control animations */
.music-playing {
    animation: musicVisualize 1s ease-in-out infinite alternate;
}

@keyframes musicVisualize {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

/* Mobile Specific */
@media (max-width: 480px) {
    .container {
        padding: 15px;
        max-width: 100%;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .event-card {
        padding: 15px;
    }
    
    .jumpscare-content h2 {
        font-size: 2.5rem;
    }
    
    .ghost-img {
        width: 120px;
        height: 120px;
    }
    
    .audio-controls {
        top: 15px;
        right: 15px;
        padding: 12px;
    }
    
    .music-toggle {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    #volumeSlider {
        width: 70px;
    }
}

/* Warning Overlay */
.warning-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.7s ease;
}

.warning-overlay.show {
    opacity: 1;
    visibility: visible;
}

.warning-content {
    background: #050505;
    border: 1px solid #1a1a1a;
    padding: 30px;
    text-align: left;
    max-width: 600px;
    width: 95%;
    height: 95vh;
    overflow-y: auto;
    box-shadow: 
        inset 0 0 30px rgba(0,0,0,0.9),
        0 0 10px rgba(0,0,0,0.7);
    position: relative;
}

@keyframes darkPulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.warning-icon {
    font-size: 1.2rem;
    color: #333333;
    font-weight: bold;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 10px;
}

.warning-content h2 {
    color: #2a2a2a;
    margin: 15px 0;
    font-size: 1.4rem;
    text-align: center;
    font-weight: 300;
}

.warning-message {
    text-align: left;
    margin: 15px 0;
    color: #4a4a4a;
    font-size: 0.85rem;
    line-height: 1.5;
}

.warning-message h4 {
    color: #333333;
    font-size: 1rem;
    margin: 20px 0 10px 0;
    font-weight: 400;
}

.warning-message ul {
    padding-left: 0;
    list-style: none;
    margin: 15px 0;
}

.warning-message li {
    margin: 8px 0;
    padding: 10px 15px;
    background: rgba(139,0,0,0.4);
    border-radius: 8px;
    border-left: 4px solid #dc143c;
    transition: all 0.3s ease;
}

.warning-message li:hover {
    background: rgba(139,0,0,0.6);
    border-left-color: #ff4444;
}

.warning-details {
    background: rgba(255,107,53,0.1);
    border: 2px solid rgba(255,107,53,0.5);
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
}

.health-warning {
    background: rgba(220,20,60,0.2);
    border: 2px solid rgba(220,20,60,0.6);
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
}

.legal-notice {
    background: rgba(139,0,139,0.2);
    border: 2px solid rgba(139,0,139,0.5);
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
}

.disclaimer {
    background: rgba(255,68,68,0.15);
    border: 3px solid #ff4444;
    border-radius: 15px;
    padding: 25px;
    margin: 40px 0 30px 0;
    text-align: center;
    position: sticky;
    bottom: 0;
    backdrop-filter: blur(10px);
    box-shadow: 0 -10px 30px rgba(255,68,68,0.3);
}

.disclaimer p {
    margin: 8px 0;
    font-weight: bold;
    color: #ffaaaa;
}

/* Scroll Indicator */


/* Hide scroll indicator on mobile */
@media (max-width: 768px) {
    .warning-content::before {
        content: "⬇️ เลื่อนลง ⬇️";
        font-size: 0.8rem;
        padding: 8px 12px;
        right: 10px;
    }
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(-50%); }
    50% { transform: translateY(-40%); }
}

.warning-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.exit-btn, .agree-btn {
    padding: 12px 25px;
    border: 1px solid #2a2a2a;
    background: #0a0a0a;
    font-size: 0.9rem;
    color: #666666;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.exit-btn {
    background: #080808;
    border-color: #1a1a1a;
}

.exit-btn:hover {
    background: #0f0f0f;
    color: #888888;
}

.agree-btn {
    background: #0d0d0d;
    border-color: #1f1f1f;
}

.agree-btn:hover {
    background: #151515;
    color: #999999;
}

/* Mobile responsiveness for warning */
@media (max-width: 768px) {
    .warning-content {
        padding: 25px 20px;
        margin: 10px;
        max-width: 95%;
        height: 98vh;
        border-radius: 15px;
    }
    
    .warning-content h2 {
        font-size: 1.4rem;
        margin: 15px 0;
    }
    
    .warning-message {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .warning-message h4 {
        font-size: 1.1rem;
        margin: 20px 0 10px 0;
    }
    
    .warning-details,
    .health-warning,
    .legal-notice {
        padding: 15px;
        margin: 20px 0;
    }
    
    .disclaimer {
        padding: 20px 15px;
        margin: 30px 0 20px 0;
    }
    
    .warning-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .exit-btn, .agree-btn {
        width: 100%;
        max-width: 250px;
        padding: 15px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .warning-content {
        padding: 20px 15px;
        margin: 5px;
        height: 99vh;
    }
    
    .warning-content h2 {
        font-size: 1.2rem;
    }
    
    .warning-message {
        font-size: 0.85rem;
    }
    
    .warning-message h4 {
        font-size: 1rem;
    }
}

/* Audio Start Overlay */
.audio-start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000;
    z-index: 99998;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.audio-start-overlay.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    animation: fastFadeIn 0.2s ease-out;
}

.audio-start-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    animation: fadeOut 0.5s ease-out;
}

.audio-start-content {
    text-align: center;
    color: #4a4a4a;
    max-width: 400px;
    padding: 40px 30px;
    background: #050505;
    border: 1px solid #1a1a1a;
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.9),
        0 0 10px rgba(0,0,0,0.7);
    position: relative;
}

.audio-start-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,107,53,0.1), transparent);
    animation: shimmer 3s infinite linear;
    pointer-events: none;
}

.halloween-icon {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333333;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
}

.audio-start-content h2 {
    font-size: 1.8rem;
    margin-bottom: 12px;
    color: #2d2d2d;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
    font-weight: 300;
}

.audio-start-content p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: #555555;
    line-height: 1.5;
}

.warning-text {
    color: #666666 !important;
    font-weight: 400;
    margin-bottom: 25px !important;
    background: rgba(20,20,20,0.3);
    padding: 8px;
    border-left: 2px solid #333333;
}

.start-audio-btn {
    background: #0a0a0a;
    color: #666666;
    border: 1px solid #2a2a2a;
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        inset 0 0 10px rgba(0,0,0,0.8),
        0 1px 3px rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
}

.start-audio-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transition: all 0.6s ease;
    transform: translate(-50%, -50%);
}

.start-audio-btn:hover {
    background: #151515;
    color: #888888;
}

.start-audio-btn:active {
    background: #050505;
}



.sub-text {
    font-size: 0.8rem !important;
    color: #555555 !important;
    margin-top: 15px !important;
    margin-bottom: 0 !important;
    font-style: italic;
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

@keyframes fastFadeIn {
    from { 
        opacity: 0;
        transform: scale(0.95);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from { 
        opacity: 1;
        backdrop-filter: blur(10px);
    }
    to { 
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(100px) scale(0.8);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    80% { transform: translateY(-7px); }
}

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 
            0 10px 30px rgba(255,107,53,0.4),
            inset 0 2px 5px rgba(255,255,255,0.2);
    }
    50% { 
        box-shadow: 
            0 15px 40px rgba(255,107,53,0.7),
            0 0 25px rgba(255,107,53,0.5),
            inset 0 2px 5px rgba(255,255,255,0.3);
    }
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
    100% { transform: rotate(0deg); }
}

/* Image-specific animations */

@keyframes imagePulse {
    0%, 100% { 
        transform: scale(1);
        filter: 
            drop-shadow(0 0 35px rgba(139, 0, 0, 0.9))
            brightness(1.1)
            contrast(1.6);
    }
    50% { 
        transform: scale(1.15);
        filter: 
            drop-shadow(0 0 45px rgba(139, 0, 0, 1))
            brightness(1.4)
            contrast(1.8);
    }
}

@keyframes imageTwist {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes ghostInstantAppear {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}



@keyframes imageIntense {
    0% { 
        filter: brightness(1.1) contrast(1.4) saturate(1.2);
    }
    50% { 
        filter: brightness(1.3) contrast(1.6) saturate(1.5) hue-rotate(10deg);
    }
    100% { 
        filter: brightness(1.1) contrast(1.4) saturate(1.2);
    }
}

@keyframes fallbackPulse {
    0% { 
        background: linear-gradient(45deg, #000 0%, #330000 50%, #000 100%);
        transform: scale(1);
    }
    50% { 
        background: linear-gradient(45deg, #110000 0%, #440000 50%, #110000 100%);
        transform: scale(1.02);
    }
    100% { 
        background: linear-gradient(45deg, #000 0%, #330000 50%, #000 100%);
        transform: scale(1);
    }
}

@keyframes textGlow {
    0% {
        text-shadow: 
            0 0 20px #ff0000,
            0 0 40px #ff0000,
            0 0 60px #ff0000;
    }
    100% {
        text-shadow: 
            0 0 30px #ff0000,
            0 0 60px #ff0000,
            0 0 90px #ff0000,
            0 0 120px #ff0000;
    }
}

/* Hide scare text during jumpscare */
#scareText, #scareMessage {
    display: none !important;
}

/* Custom Alert Box */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.custom-alert-overlay.show {
    display: flex;
    opacity: 1;
}

.custom-alert-box {
    background: #080808;
    border: 1px solid #1a1a1a;
    padding: 25px;
    max-width: 350px;
    width: 90%;
    text-align: center;
    box-shadow: 
        inset 0 0 20px rgba(0,0,0,0.9),
        0 0 10px rgba(0,0,0,0.8);
    position: relative;
}

.custom-alert-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,107,53,0.1), transparent);
    animation: shimmer 2s infinite linear;
    pointer-events: none;
}

.alert-icon {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333333;
    font-weight: bold;
}

.alert-title {
    font-size: 1.2rem;
    color: #2d2d2d;
    margin-bottom: 8px;
    font-weight: 400;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.9);
}

.alert-message {
    font-size: 0.95rem;
    color: #666666;
    margin-bottom: 20px;
    line-height: 1.7;
    text-align: left;
    max-height: 400px;
    overflow-y: auto;
    padding: 0 10px;
}

.alert-message p {
    margin-bottom: 15px;
    text-indent: 0;
    line-height: 1.8;
}

.alert-message p:last-child {
    margin-bottom: 0;
}

/* Better formatting for bullet points */
.alert-message br + • {
    margin-left: 20px;
}

.alert-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.alert-btn {
    padding: 10px 20px;
    border: 1px solid #2a2a2a;
    background: #0a0a0a;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 70px;
    color: #666666;
}

.alert-btn-primary {
    background: #0d0d0d;
    border-color: #1f1f1f;
}

.alert-btn-primary:hover {
    background: #151515;
    color: #888888;
}

.alert-btn-secondary {
    background: #080808;
    border-color: #1a1a1a;
}

.alert-btn-secondary:hover {
    background: #0f0f0f;
    color: #777777;
}

@keyframes alertSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }
    50% {
        transform: scale(1.05) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Dark Animations */
@keyframes subtleGlow {
    0%, 100% { 
        text-shadow: 2px 2px 8px rgba(0,0,0,0.9); 
    }
    50% { 
        text-shadow: 2px 2px 12px rgba(0,0,0,0.9), 0 0 5px rgba(40,40,40,0.3); 
    }
}

@keyframes warningPulse {
    0%, 100% { 
        background-color: rgba(139,0,0,0.3); 
        box-shadow: 0 0 15px rgba(255,0,0,0.4); 
    }
    50% { 
        background-color: rgba(139,0,0,0.6); 
        box-shadow: 0 0 25px rgba(255,0,0,0.8); 
    }
}

@keyframes cardPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255,0,0,0.3); 
    }
    50% { 
        box-shadow: 0 0 40px rgba(255,0,0,0.6), 0 0 60px rgba(255,0,0,0.2); 
    }
}

@keyframes dangerBlink {
    0%, 50%, 100% { 
        color: #ffff00; 
        text-shadow: 0 0 10px rgba(255,255,0,0.8); 
    }
    25%, 75% { 
        color: #ff0000; 
        text-shadow: 0 0 15px rgba(255,0,0,1); 
    }
}

@keyframes buttonGlow {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(255,0,0,0.4); 
    }
    50% { 
        box-shadow: 0 0 30px rgba(255,0,0,0.8), 0 0 45px rgba(255,0,0,0.4); 
    }
}

@keyframes cursedGlow {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(255,0,0,0.6), inset 0 0 20px rgba(139,0,0,0.3); 
    }
    50% { 
        box-shadow: 0 0 50px rgba(255,0,0,1), inset 0 0 30px rgba(139,0,0,0.6); 
    }
}

@keyframes cursedRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes cursedText {
    0%, 100% { 
        text-shadow: 0 0 15px rgba(255,0,0,0.8); 
    }
    50% { 
        text-shadow: 0 0 25px rgba(255,0,0,1), 0 0 35px rgba(255,0,0,0.6); 
    }
}

@keyframes cursedButtonPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 30px rgba(255,0,0,0.6); 
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 0 40px rgba(255,0,0,1); 
    }
}

@keyframes hauntedPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255,0,0,0.4), inset 0 0 15px rgba(139,0,0,0.2); 
    }
    50% { 
        box-shadow: 0 0 35px rgba(255,0,0,0.7), inset 0 0 25px rgba(139,0,0,0.4); 
    }
}

@keyframes hauntedTitle {
    0%, 100% { 
        text-shadow: 0 0 20px rgba(255,0,0,1); 
    }
    50% { 
        text-shadow: 0 0 30px rgba(255,0,0,1), 0 0 40px rgba(255,0,0,0.8); 
    }
}

@keyframes cursedFlicker {
    0%, 90%, 100% { 
        opacity: 1; 
        box-shadow: 0 0 25px rgba(255,0,0,0.4), inset 0 0 15px rgba(139,0,0,0.2); 
    }
    5%, 15% { 
        opacity: 0.8; 
        box-shadow: 0 0 15px rgba(255,0,0,0.2), inset 0 0 10px rgba(139,0,0,0.1); 
    }
}

@keyframes cursedFooterPulse {
    0%, 100% { 
        box-shadow: 0 -10px 30px rgba(255,0,0,0.3), inset 0 0 20px rgba(139,0,0,0.2); 
    }
    50% { 
        box-shadow: 0 -15px 40px rgba(255,0,0,0.6), inset 0 0 30px rgba(139,0,0,0.4); 
    }
}

@keyframes cursedFooterText {
    0%, 100% { 
        text-shadow: 0 0 15px rgba(255,0,0,0.8); 
    }
    50% { 
        text-shadow: 0 0 25px rgba(255,0,0,1), 0 0 35px rgba(255,0,0,0.6); 
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes bounce {
    0%, 20%, 60%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    80% { transform: translateY(-5px); }
}

/* Enhanced Typography Improvements */
h1, h2, h3, h4, h5, h6 {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

p {
    orphans: 3;
    widows: 3;
}

/* Better text spacing */
.container {
    word-spacing: 0.1em;
}

/* Improved readability */
@media screen and (max-width: 480px) {
    body {
        font-size: 15px;
        line-height: 1.5;
    }
    
    header h1 {
        font-size: 1.6rem;
        letter-spacing: 2px;
    }
    
    .event-card h3 {
        font-size: 1.1rem;
    }
    
    .knowledge-section h3 {
        font-size: 1.2rem;
    }
}

/* Touch device specific */
/* Enhanced Text Readability */
p {
    margin-bottom: 1.2em;
    orphans: 3;
    widows: 3;
}

h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.8em;
    line-height: 1.4;
}

/* Better text spacing in Thai */
body {
    word-spacing: 0.1em;
}

/* Improved readability for different screen sizes */
@media screen and (max-width: 480px) {
    .event-card p {
        font-size: 0.95rem;
        line-height: 1.8;
        padding: 0 10px;
        margin-bottom: 18px;
    }
    
    .danger-text {
        padding: 0 15px;
        font-size: 0.85rem;
        line-height: 1.7;
    }
    
    header p {
        padding: 0 15px;
        font-size: 0.95rem;
    }
}

/* Reading Jumpscare Styles */
.reading-jumpscare {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.95);
    animation: jumpscareFlash 0.1s ease-in-out;
}

.jumpscare-image {
    text-align: center;
    animation: jumpscareZoom 2s ease-out;
}

.scare-img {
    max-width: 80vw;
    max-height: 80vh;
    filter: brightness(1.2) contrast(1.3);
    animation: jumpscareShake 0.5s ease-in-out infinite;
}

.scare-text {
    font-size: 3rem;
    color: #ff0000;
    text-shadow: 0 0 20px #ff0000;
    margin-top: 20px;
    animation: scareBlink 0.3s ease-in-out infinite;
    font-weight: bold;
    font-family: 'Arial', sans-serif;
}

.jumpscare-shake {
    animation: alertShake 0.5s ease-in-out infinite !important;
}

@keyframes jumpscareFlash {
    0% { background: rgba(255,0,0,0.9); }
    50% { background: rgba(0,0,0,0.95); }
    100% { background: rgba(255,0,0,0.3); }
}

@keyframes jumpscareZoom {
    0% { 
        transform: scale(0.1) rotate(-180deg);
        opacity: 0;
    }
    10% {
        transform: scale(1.5) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes jumpscareShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) rotate(-2deg); }
    75% { transform: translateX(5px) rotate(2deg); }
}

@keyframes scareBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes alertShake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-10px); }
    20% { transform: translateX(10px); }
    30% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    50% { transform: translateX(-5px); }
    60% { transform: translateX(5px); }
    70% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
    90% { transform: translateX(-2px); }
}

@media (hover: none) {
    .btn-primary:active, .btn-claim:active {
        transform: scale(0.95);
    }
    
    .alert-btn:active {
        transform: scale(0.95) translateY(-2px);
    }
}