/* Murder Mystery Detective Game - Complete Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: white;
    min-height: 100vh;
    background-color: #000000;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

/* Mobile devices - vertical image with WebP */
@media (max-width: 768px) {
    body {
        background-image: 
            linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
            url('/images/background-mobile.webp'),
            url('/images/background-mobile.jpg');
    }
}

/* Desktop/tablet - horizontal image with WebP */
@media (min-width: 769px) {
    body {
        background-image: 
            linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
            url('/images/background-desktop.webp'),
            url('/images/background-desktop.jpg');
    }
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

/* Logo Styles */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.game-logo {
    max-width: 300px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.game-logo {
    max-width: 300px;
    width: 80%;
    height: auto;
    margin: 0 auto;
    display: block;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .game-logo {
        max-width: 200px;
        width: 70%;
    }
    
    .logo-container {
        margin-bottom: 1.5rem;
    }
}

/* Optional: Add a subtle glow effect */
.game-logo {
    filter: drop-shadow(0 0 20px rgba(251, 191, 36, 0.3));
    transition: all 0.3s ease;
}

.game-logo:hover {
    filter: drop-shadow(0 0 30px rgba(251, 191, 36, 0.5));
    transform: scale(1.05);
}
.main-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fbbf24, #f97316, #eab308);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
}

.subtitle {
    font-size: 1.25rem;
    color: #d6d3d1;
    max-width: 40rem;
    margin: 0 auto;
    line-height: 1.6;
}

.gradient-line {
    height: 4px;
    background: linear-gradient(to right, #fbbf24, #f97316);
    border-radius: 2px;
    width: 16rem;
    margin: 1rem auto;
}

.card {
    background: rgba(41, 37, 36, 0.9);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid #57534e;
    margin-bottom: 1.5rem;
}

.btn-primary {
    background: linear-gradient(to right, #fbbf24, #f97316);
    color: white;
    font-weight: bold;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(1);
}

.btn-primary:hover {
    background: linear-gradient(to right, #f59e0b, #ea580c);
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.3);
}

.btn-secondary {
    background: rgba(68, 64, 60, 0.8);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #78716c;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(87, 83, 78, 0.8);
}

.difficulty-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    max-width: 80rem;
    margin: 0 auto;
}

.difficulty-card {
    flex: 0 0 300px;
    background: rgba(68, 64, 60, 0.8);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid #57534e;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(1);
}

.difficulty-card:hover {
    border-color: #78716c;
    transform: scale(1.05);
}

.difficulty-card.selected {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}

.difficulty-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.teal-gradient { background: linear-gradient(to right, #2dd4bf, #06b6d4); }
.yellow-gradient { background: linear-gradient(to right, #fbbf24, #f59e0b); }
.purple-gradient { background: linear-gradient(to right, #c084fc, #a855f7); }

.game-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-container {
    background: rgba(41, 37, 36, 0.9);
    border-radius: 0.75rem;
    border: 1px solid #57534e;
    height: 24rem;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.message.player {
    background: rgba(5, 150, 105, 0.8);
    margin-left: 2rem;
}

.message.game {
    background: rgba(68, 64, 60, 0.8);
    margin-right: 2rem;
}

.message.solution {
    background: rgba(34, 197, 94, 0.8);
}

.message.error {
    background: rgba(239, 68, 68, 0.8);
}

.chat-input {
    border-top: 1px solid #57534e;
    padding: 1rem;
    background: rgba(68, 64, 60, 0.8);
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    background: #57534e;
    border: 1px solid #78716c;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    color: white;
    outline: none;
}

.chat-input input:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 0 1px #fbbf24;
}

.chat-input input::placeholder {
    color: #a8a29e;
}

.chat-input input.listening {
    border-color: #ef4444;
    animation: listening 1s ease-in-out infinite;
}

@keyframes listening {
    0%, 100% {
        border-color: #ef4444;
    }
    50% {
        border-color: #fbbf24;
    }
}

.send-btn {
    background: linear-gradient(to right, #f59e0b, #ea580c);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.send-btn:hover {
    background: linear-gradient(to right, #d97706, #dc2626);
    transform: scale(1.05);
}

.send-btn:disabled {
    background: #57534e;
    cursor: not-allowed;
    transform: scale(1);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.items-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-card {
    background: rgba(68, 64, 60, 0.5);
    border-radius: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #57534e;
}

.item-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.item-detail {
    font-size: 0.75rem;
    color: #d6d3d1;
    margin-bottom: 0.25rem;
}

.item-location {
    font-size: 0.75rem;
    color: #a8a29e;
}

.stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(41, 37, 36, 0.9);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid #57534e;
    margin-bottom: 1.5rem;
}

.case-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fbbf24;
}

.stats-badges {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(68, 64, 60, 0.6);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid;
    font-size: 0.875rem;
}

.badge.accusations { border-color: rgba(34, 197, 94, 0.3); }
.badge.timer { border-color: rgba(251, 191, 36, 0.3); }
.badge.difficulty { border-color: rgba(168, 162, 158, 0.3); }

.toolkit {
    background: rgba(41, 37, 36, 0.9);
    border-radius: 0.75rem;
    padding: 1rem;
    border: 1px solid #57534e;
}

.toolkit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.toolkit-btn {
    background: #57534e;
    color: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.toolkit-btn:hover {
    background: #68625d;
}

.toolkit-btn:disabled {
    background: #44403c;
    color: #a8a29e;
    cursor: not-allowed;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid #57534e;
    border-top: 2px solid #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.share-btn {
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    color: white;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-btn:hover {
    background: linear-gradient(to right, #2563eb, #7c3aed);
    transform: scale(1.05);
}

/* Email Modal Styles */
.email-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.email-modal-content {
    background: #292524;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    border: 1px solid #57534e;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.email-modal input[type="text"], 
.email-modal input[type="email"], 
.email-modal input[type="tel"] {
    width: 100%;
    background: #57534e;
    border: 1px solid #78716c;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: white;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.email-modal input:focus {
    border-color: #fbbf24;
    outline: none;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}

.email-modal input::placeholder {
    color: #a8a29e;
}

.email-modal .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #a8a29e;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: color 0.3s ease;
}

.email-modal .close-btn:hover {
    color: white;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.checkbox-container input[type="checkbox"] {
    width: auto;
    margin: 0;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.checkbox-container label {
    color: #d6d3d1;
    font-size: 0.875rem;
    cursor: pointer;
    line-height: 1.4;
}

/* Voice Controls */
.voice-controls {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    gap: 1rem;
    z-index: 100;
}

.voice-btn {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(41, 37, 36, 0.9);
    border: 2px solid #57534e;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative; /* SAFARI FIX: Added for positioning the pending indicator */
}

.voice-btn:hover {
    background: rgba(68, 64, 60, 0.9);
    transform: scale(1.1);
}

.voice-btn.active {
    background: linear-gradient(to right, #fbbf24, #f97316);
    border-color: #fbbf24;
}

.voice-btn.recording {
    animation: pulse 1.5s infinite;
}

/* SAFARI FIX: Audio unlock indicator */
.voice-btn.pending::after {
    content: '!';
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: bounce 1s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(251, 191, 36, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
    }
}

/* SAFARI FIX: Bounce animation for pending indicator */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* Utility Classes */
.hidden { display: none; }
.text-center { text-align: center; }
.text-orange { color: #f97316; }
.text-teal { color: #14b8a6; }
.text-amber { color: #fbbf24; }
.text-green { color: #22c55e; }
.text-red { color: #ef4444; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .game-layout {
        grid-template-columns: 1fr;
    }
    
    .difficulty-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .difficulty-card {
        flex: 0 0 auto;
        width: 100%;
        max-width: 400px;
    }
    
    .toolkit-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .stats-badges {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .btn-container {
        flex-direction: column-reverse;
        align-items: center;
    }
    
    .btn-container .btn-secondary,
    .btn-container .btn-primary {
        width: 100%;
        max-width: 300px;
        margin: 0.5rem 0;
    }

    .email-modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .voice-controls {
        bottom: 1rem;
        right: 1rem;
        gap: 0.5rem;
    }
    
    .voice-btn {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
    
    .btn-primary, .btn-secondary {
        min-height: 44px; /* iOS recommended touch target size */
    }
    
    .email-modal input[type="text"], 
    .email-modal input[type="email"],
    .email-modal input[type="tel"] {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ============================================
   COMPREHENSIVE DESKTOP LAYOUT REDESIGN
   Add this at the BOTTOM of styles.css
   ============================================ */

/* Desktop Layout Improvements (1024px and up) */
@media (min-width: 1024px) {
    /* Container max width for better readability */
    .game-container {
        max-width: 1400px;
        padding: 2rem;
    }
    
    /* Fix Case Overview Grid - Clean 2 column layout */
    #game-screen > div:nth-child(2) .card {
        max-width: 1000px;
        margin: 0 auto 2rem;
    }
    
    /* Force proper grid for victim/location */
    #game-screen div[style*="grid-template-columns: repeat(auto-fit"] {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 2rem !important;
    }
    
    /* Initial scene takes full width */
    #game-screen div[style*="grid-column: 1 / -1"] {
        grid-column: 1 / -1 !important;
    }
    
    /* Main game layout - Better proportions */
    .game-layout {
        display: grid;
        grid-template-columns: 380px 1fr !important;
        gap: 2rem;
        align-items: start;
    }
    
    /* Sidebar styling */
    .sidebar {
        position: sticky;
        top: 2rem;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }
    
    /* Sidebar cards more compact */
    .sidebar .card {
        padding: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Main content area */
    .main-content {
        max-width: 100%;
    }
    
    /* Chat container - Better height */
    .chat-container {
        height: 500px !important;
        margin-bottom: 1.5rem;
    }
    
    /* Toolkit below chat */
    .toolkit {
        margin-bottom: 1.5rem;
    }
    
    /* Stats header - Better spacing */
    .stats-header {
        max-width: 1000px;
        margin: 0 auto 2rem;
        padding: 1.5rem !important;
    }
    
    /* Case title larger on desktop */
    .case-title {
        font-size: 2rem !important;
    }
    
    /* Better button sizes in toolkit */
    .toolkit-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.75rem;
    }
    
    .toolkit-btn {
        padding: 1rem !important;
        font-size: 0.9rem !important;
    }
}

/* Extra large screens (1440px+) */
@media (min-width: 1440px) {
    /* Even better proportions for wide screens */
    .game-layout {
        grid-template-columns: 420px 1fr !important;
        gap: 3rem;
    }
    
    /* Larger chat on big screens */
    .chat-container {
        height: 600px !important;
    }
    
    /* More spacing in cards */
    .card {
        padding: 2.5rem !important;
    }
}

/* Ultra-wide screens (1920px+) - Optional */
@media (min-width: 1920px) {
    .game-container {
        max-width: 1600px;
    }
    
    /* Center the game layout with max width */
    .game-layout {
        max-width: 1500px;
        margin: 0 auto;
    }
}

/* Smooth scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Tablet Layout - Stack sidebar above chat */
@media (max-width: 1023px) {
    .game-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem;
    }
    
    /* Horizontal layout for sidebar items on tablet */
    .sidebar {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 1rem;
        width: 100%;
    }
    
    /* Remove sticky positioning on tablet */
    .sidebar {
        position: static !important;
        max-height: none !important;
    }
    
    /* Smaller cards on tablet */
    .sidebar .card {
        padding: 1rem !important;
    }
    
    /* Smaller text in sidebar */
    .sidebar .section-header {
        font-size: 1rem !important;
    }
    
    /* Chat takes full width */
    .main-content {
        width: 100%;
    }
}

/* Mobile Layout - Stack everything vertically */
@media (max-width: 640px) {
    .sidebar {
        display: flex !important;
        flex-direction: column !important;
    }
}

/* End Game Screen Styles - Complete Redesign */
#endgame-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    z-index: 2000;
    overflow-y: auto;
}

/* Mobile devices - vertical image */
@media (max-width: 768px) {
    #endgame-screen {
        background-image: 
            linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
            url('/images/background-mobile.webp'),
            url('/images/background-mobile.jpg');
    }
}

/* Desktop/tablet - horizontal image */
@media (min-width: 769px) {
    #endgame-screen {
        background-image: 
            linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)),
            url('/images/background-desktop.webp'),
            url('/images/background-desktop.jpg');
    }
}

.ending-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.ending-card {
    max-width: 600px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-icon {
    font-size: 6rem;
    margin-bottom: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

.endgame-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #fbbf24;
}

.endgame-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.endgame-message {
    color: #d6d3d1;
    font-size: 1.125rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.stat-item {
    background: rgba(68, 64, 60, 0.8);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #57534e;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fbbf24;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: #a8a29e;
}

/* Solution reveal box */
.solution-reveal {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.solution-reveal h3 {
    color: #ef4444;
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
}

.solution-reveal p {
    color: #d6d3d1;
    line-height: 1.6;
}

.ready-message {
    color: #14b8a6;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 3rem;
    align-items: center;
}

.live-events-btn {
    background: linear-gradient(to right, #fbbf24, #f97316);
    color: white;
    font-weight: bold;
    padding: 1.25rem 2.5rem;
    border-radius: 0.75rem;
    font-size: 1.25rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 300px;
    box-shadow: 0 10px 25px rgba(251, 191, 36, 0.3);
}

.live-events-btn:hover {
    background: linear-gradient(to right, #f59e0b, #ea580c);
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(251, 191, 36, 0.4);
}

.secondary-btn {
    background: rgba(68, 64, 60, 0.8);
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    border: 1px solid #78716c;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 200px;
}

.secondary-btn:hover {
    background: rgba(87, 83, 78, 0.8);
    transform: scale(1.02);
}

/* Social Share */
.social-share {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #57534e;
}

.social-share h3 {
    color: white;
    margin-bottom: 0.5rem;
}

.share-subtitle {
    color: #a8a29e;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    background: linear-gradient(to right, #3b82f6, #8b5cf6);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.share-btn:hover {
    background: linear-gradient(to right, #2563eb, #7c3aed);
    transform: scale(1.05);
}

.facebook-btn {
    background: linear-gradient(to right, #1877f2, #42a5f5);
}

.facebook-btn:hover {
    background: linear-gradient(to right, #166fe5, #1976d2);
}

/* Hide social share for failures */
#failure-content ~ .social-share {
    display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .result-icon {
        font-size: 4rem;
        margin-bottom: 1.5rem;
    }
    
    .endgame-title {
        font-size: 2rem;
    }
    
    .endgame-subtitle {
        font-size: 1.25rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .cta-buttons {
        gap: 0.75rem;
    }
    
    .live-events-btn {
        font-size: 1.125rem;
        padding: 1.125rem 2rem;
        min-width: 280px;
    }
    
    .secondary-btn {
        padding: 0.875rem 1.5rem;
        min-width: 180px;
    }
    
    .share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .share-btn {
        width: 200px;
        justify-content: center;
    }
}

/* Confetti Animation */
@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Transition Screen Styles */
#transition-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
}

.fullscreen-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.transition-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.transition-content {
    text-align: center;
    max-width: 600px;
    padding: 3rem;
    background: rgba(41, 37, 36, 0.95);
    border-radius: 1.5rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(251, 191, 36, 0.3);
}

.transition-phase {
    animation: fadeIn 0.5s ease-out;
}

.loading-title {
    font-size: 2.5rem;
    color: #fbbf24;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.large-spinner {
    width: 80px;
    height: 80px;
    margin: 2rem auto;
    border: 4px solid rgba(251, 191, 36, 0.2);
    border-top: 4px solid #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: #d6d3d1;
    font-size: 1.125rem;
    font-style: italic;
}

.ready-title {
    font-size: 2.5rem;
    color: #22c55e;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: pulseText 2s ease-in-out infinite;
}

@keyframes pulseText {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.case-preview {
    background: rgba(68, 64, 60, 0.8);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.case-preview h3 {
    color: #fbbf24;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.case-preview p {
    color: #d6d3d1;
    font-size: 1.125rem;
}

.start-session-btn {
    font-size: 1.5rem;
    padding: 1.25rem 3rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.4);
    animation: buttonPulse 2s ease-in-out infinite;
}

@keyframes buttonPulse {
    0%, 100% {
        box-shadow: 0 10px 30px rgba(251, 191, 36, 0.4);
    }
    50% {
        box-shadow: 0 15px 40px rgba(251, 191, 36, 0.6);
    }
}

.ready-hint {
    color: #a8a29e;
    font-size: 0.875rem;
    font-style: italic;
}

/* Investigation Reveal Popup Styles */
.investigation-reveal-container {
    /* Change from relative to fixed positioning for popup effect */
    position: fixed !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1500;
    
    /* Add max width for better readability */
    max-width: 600px;
    width: 90%;
    margin: 0; /* Override any existing margins */
    
    /* Update animation */
    animation: popupReveal 0.5s ease-out;
}

@keyframes popupReveal {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Investigation Board Note Styling - Make discoveries stand out */
.investigation-note.new-discovery {
    background: rgba(251, 191, 36, 0.2);
    border-left: 4px solid #f97316;
    animation: slideInNote 0.5s ease-out;
}

@keyframes slideInNote {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Timestamp styling */
.note-timestamp {
    display: block;
    font-size: 0.75rem;
    color: #a8a29e;
    margin-top: 0.5rem;
    text-align: right;
}