* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quantico', sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    color: #e0e0e0;
    position: relative;
    overflow-x: hidden;
    padding-bottom: 48px;
}

/* Animated Smoke Background */
.smoke-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(180deg, #1a1a1a 0%, #141414 100%);
    overflow: hidden;
}

.smoke-background::before,
.smoke-background::after {
    content: '';
    position: absolute;
    width: 400%;
    height: 400%;
    top: -150%;
    left: -150%;
    pointer-events: none;
}

.smoke-background::before {
    background: 
        radial-gradient(ellipse at 30% 40%, rgba(255, 255, 255, 0.03) 0%, transparent 70%),
        radial-gradient(ellipse at 70% 60%, rgba(255, 255, 255, 0.02) 0%, transparent 65%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.02) 0%, transparent 75%);
    animation: smokeFloat1 80s ease-in-out infinite;
    opacity: 0.4;
    mix-blend-mode: overlay;
}

.smoke-background::after {
    background: 
        radial-gradient(ellipse at 60% 30%, rgba(255, 255, 255, 0.02) 0%, transparent 70%),
        radial-gradient(ellipse at 40% 70%, rgba(255, 255, 255, 0.03) 0%, transparent 65%),
        radial-gradient(ellipse at 20% 20%, rgba(255, 255, 255, 0.02) 0%, transparent 60%),
        radial-gradient(ellipse at 90% 90%, rgba(255, 255, 255, 0.03) 0%, transparent 75%),
        radial-gradient(ellipse at 10% 90%, rgba(255, 255, 255, 0.02) 0%, transparent 65%);
    animation: smokeFloat2 100s ease-in-out infinite reverse;
    opacity: 0.3;
    mix-blend-mode: overlay;
}

@keyframes smokeFloat1 {
    0%, 100% {
        transform: translate(0%, 0%) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(-3%, 2%) rotate(1deg) scale(1.02);
    }
    50% {
        transform: translate(-5%, -3%) rotate(-1deg) scale(1.03);
    }
    75% {
        transform: translate(2%, -2%) rotate(0.5deg) scale(1.01);
    }
}

@keyframes smokeFloat2 {
    0%, 100% {
        transform: translate(0%, 0%) rotate(0deg) scale(1);
    }
    25% {
        transform: translate(4%, -2%) rotate(-1deg) scale(1.02);
    }
    50% {
        transform: translate(6%, 4%) rotate(1deg) scale(1.04);
    }
    75% {
        transform: translate(-3%, 3%) rotate(-0.5deg) scale(1.01);
    }
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* Menu Screen */
#menu-screen {
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.menu-container {
    background: rgba(28, 28, 28, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 4px;
    padding: 48px 32px;
    max-width: 600px;
    width: 100%;
    border: 1px solid #d4af37;
    box-shadow: 
        0 0 20px rgba(212, 175, 55, 0.2),
        inset 0 0 40px rgba(0, 0, 0, 0.5);
    position: relative;
}

.menu-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

.logo {
    text-align: center;
    margin-bottom: 48px;
}

.shield-icon {
    width: 64px;
    height: 64px;
    color: #d4af37;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.5));
}

.title {
    font-size: 36px;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 8px;
    letter-spacing: 4px;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #999;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.mode-btn {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    border: 1px solid #555;
    border-radius: 4px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

.mode-btn:hover::before {
    left: 100%;
}

.mode-btn:hover {
    border-color: #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.mode-btn.easy::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #4a9d5f;
}

.mode-btn.hard::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #a83232;
}

.mode-title {
    font-size: 20px;
    font-weight: 700;
    color: #e0e0e0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.mode-desc {
    font-size: 11px;
    font-weight: 400;
    color: #888;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.instructions {
    text-align: center;
    color: #666;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Game Screen */
#game-screen {
    padding: 20px;
}

.game-header {
    background: rgba(28, 28, 28, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 4px;
    padding: 16px 24px;
    margin-bottom: 20px;
    border: 1px solid #d4af37;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
}

.game-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    transition: opacity 0.3s ease;
}

.header-left:hover {
    opacity: 0.7;
}

.shield-icon-small {
    width: 24px;
    height: 24px;
    color: #d4af37;
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, 0.5));
}

.game-title {
    font-size: 18px;
    font-weight: 700;
    color: #d4af37;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.stat-box {
    text-align: center;
    position: relative;
    padding: 8px 16px;
    border-left: 1px solid #333;
}

.stat-box:first-child {
    border-left: none;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #e0e0e0;
    text-shadow: 0 0 10px rgba(224, 224, 224, 0.3);
}

.stat-value.correct {
    color: #4a9d5f;
    text-shadow: 0 0 10px rgba(74, 157, 95, 0.5);
}

.stat-value.incorrect {
    color: #a83232;
    text-shadow: 0 0 10px rgba(168, 50, 50, 0.5);
}

.stat-label {
    font-size: 9px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.timer {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    padding-left: 16px;
    border-left: 1px solid #333;
}

.clock-icon {
    width: 20px;
    height: 20px;
}

#timer {
    font-family: 'Quantico', monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.game-content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    background: rgba(28, 28, 28, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 4px;
    padding: 20px;
    padding-bottom: 80px;
    border: 1px solid #d4af37;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.game-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

/* Feedback Message Area */
.feedback-message {
    min-height: 0;
    padding: 0;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #d4af37;
    opacity: 0;
    transition: opacity 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.feedback-message.active {
    opacity: 1;
    padding: 12px 20px;
    min-height: 48px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid #d4af37;
    border-radius: 4px;
}

.feedback-message.incorrect {
    color: #a83232;
    background: rgba(168, 50, 50, 0.1);
    border-color: #a83232;
}

.feedback-message.info {
    color: #4a9d5f;
    background: rgba(74, 157, 95, 0.1);
    border-color: #4a9d5f;
}

.image-container {
    position: relative;
    background: #0a0a0a;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid #333;
    transition: all 0.3s ease;
    min-height: 300px;
    max-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8);
    padding: 20px;
}

.image-container.correct {
    border-color: #4a9d5f;
    box-shadow: 0 0 30px rgba(74, 157, 95, 0.5);
    animation: correctPulse 0.5s ease;
}

.image-container.incorrect {
    border-color: #a83232;
    box-shadow: 0 0 30px rgba(168, 50, 50, 0.5);
    animation: incorrectShake 0.5s ease;
}

@keyframes correctPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.01); }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.map-image {
    width: 100%;
    height: 100%;
    display: block;
    max-height: 58vh;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.5s ease;
}

.image-placeholder {
    width: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0a;
}

.floor-indicator {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.9);
    padding: 6px 12px;
    border-radius: 2px;
    font-size: 11px;
    color: #d4af37;
    letter-spacing: 1px;
    border: 1px solid #d4af37;
    text-transform: uppercase;
    font-weight: 700;
}

/* Input Area */
.input-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-wrapper {
    position: relative;
    width: 100%;
}

#guess-input {
    width: 100%;
    background: #0a0a0a;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 14px;
    font-size: 16px;
    color: #e0e0e0;
    text-transform: uppercase;
    font-weight: 700;
    outline: none;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    font-family: 'Quantico', sans-serif;
}

#guess-input:focus {
    border-color: #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0a0a0a;
    border: 1px solid #d4af37;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5); /* Add shadow for better visibility */
}

.suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    color: #e0e0e0;
    transition: all 0.2s ease;
    border-bottom: 1px solid #222;
    font-size: 14px;
    letter-spacing: 1px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #d4af37;
    color: #0a0a0a;
}

.button-group {
    display: flex;
    gap: 16px;
}

.btn {
    padding: 14px 28px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Quantico', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.submit-btn {
    flex: 1;
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    color: #4a9d5f;
    border: 1px solid #4a9d5f;
}

.submit-btn:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(74, 157, 95, 0.5);
    border-color: #5fb374;
}

.submit-btn:disabled {
    background: #1a1a1a;
    border-color: #333;
    color: #333;
    cursor: not-allowed;
    opacity: 0.5;
}

.intel-btn {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    color: #d4af37;
    border: 1px solid #d4af37;
}

.intel-btn:hover {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
    border-color: #ffd700;
}

.skip-btn {
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    color: #a83232;
    border: 1px solid #a83232;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.skip-btn:hover {
    box-shadow: 0 0 20px rgba(168, 50, 50, 0.5);
    border-color: #c84545;
}

.skip-btn svg {
    width: 16px;
    height: 16px;
}

/* Game Over Screen */
#gameover-screen {
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.gameover-container {
    background: rgba(28, 28, 28, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 4px;
    padding: 48px 32px;
    max-width: 600px;
    width: 100%;
    border: 1px solid #d4af37;
    text-align: center;
    position: relative;
    box-shadow: 
        0 0 40px rgba(212, 175, 55, 0.3),
        inset 0 0 40px rgba(0, 0, 0, 0.5);
}

.gameover-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

.target-icon {
    width: 80px;
    height: 80px;
    color: #d4af37;
    margin-bottom: 24px;
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.6));
}

.gameover-title {
    font-size: 40px;
    font-weight: 700;
    color: #d4af37;
    margin-bottom: 32px;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
}

.final-stats {
    background: #0a0a0a;
    border-radius: 4px;
    padding: 32px;
    margin-bottom: 32px;
    border: 1px solid #333;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.final-score {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #333;
}

.final-number {
    font-size: 56px;
    font-weight: 700;
    color: #4a9d5f;
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(74, 157, 95, 0.6);
}

.final-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.final-time-value {
    font-size: 36px;
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 8px;
    font-family: 'Quantico', monospace;
    letter-spacing: 2px;
}

.final-time-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.play-again-btn {
    background: linear-gradient(135deg, #d4af37 0%, #b8941f 100%);
    color: #0a0a0a;
    padding: 16px 48px;
    border: 1px solid #d4af37;
    font-weight: 700;
}

.play-again-btn:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
    transform: translateY(-2px);
}

/* Scrollbar Styling */
.suggestions::-webkit-scrollbar {
    width: 8px;
}

.suggestions::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.suggestions::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}

.suggestions::-webkit-scrollbar-thumb:hover {
    background: #ffd700;
}

/* Footer */
.game-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid #333;
    padding: 12px 20px;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.5);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 11px;
    letter-spacing: 1px;
}

.footer-text {
    color: #666;
    text-transform: uppercase;
    font-weight: 400;
}

.footer-link {
    color: #d4af37;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    position: relative;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 1px;
    background: #d4af37;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.footer-link:hover {
    color: #ffd700;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

.footer-link:hover::after {
    transform: scaleX(1);
}

.footer-link:hover .external-link-icon {
    transform: translate(2px, -2px);
}

.external-link-icon {
    width: 14px;
    height: 14px;
    transition: transform 0.3s ease;
}

.footer-separator {
    color: #333;
    font-weight: 400;
    padding: 0 4px;
}

.github-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.footer-link:hover .github-icon {
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1440px) {
    .game-content {
        max-width: 95%;
    }
}

@media (max-width: 1366px) {
    .image-container {
        max-height: 55vh;
    }
    
    .map-image {
        max-height: 53vh;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    .menu-container,
    .gameover-container {
        padding: 32px 20px;
    }

    .title {
        font-size: 24px;
        letter-spacing: 2px;
    }

    .subtitle {
        font-size: 10px;
    }

    .mode-title {
        font-size: 16px;
    }

    .mode-desc {
        font-size: 10px;
    }

    .game-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
        gap: 12px;
    }

    .stat-box {
        border-left: none;
        padding: 4px 8px;
    }

    .stat-value {
        font-size: 22px;
    }

    .timer {
        border-left: none;
        padding-left: 8px;
    }

    .game-content {
        padding: 16px;
        gap: 12px;
    }

    .image-container {
        min-height: 250px;
        max-height: 50vh;
    }

    .map-image {
        max-height: 48vh;
    }

    .button-group {
        flex-direction: column;
        gap: 10px;
    }

    #guess-input {
        font-size: 14px;
        padding: 12px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 12px;
    }

    .gameover-title {
        font-size: 28px;
        letter-spacing: 3px;
    }

    .final-number {
        font-size: 48px;
    }

    .final-time-value {
        font-size: 32px;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 20px;
    }

    .game-title {
        font-size: 14px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-label {
        font-size: 8px;
    }

    #timer {
        font-size: 14px;
    }

    .mode-title {
        font-size: 14px;
    }

    .btn {
        font-size: 11px;
        padding: 10px 20px;
    }

    .image-container {
        min-height: 200px;
        max-height: 45vh;
    }

    .map-image {
        max-height: 43vh;
    }

    .feedback-message {
        font-size: 11px;
    }

    .floor-indicator {
        font-size: 9px;
        padding: 4px 8px;
    }
    
    .footer-content {
        font-size: 9px;
        flex-direction: column;
        gap: 4px;
    }

    .external-link-icon {
        width: 12px;
        height: 12px;
    }
}

/* Ensure no overflow on small screens */
@media (max-height: 800px) {
    .image-container {
        max-height: 50vh;
    }

    .map-image {
        max-height: 48vh;
    }

    .game-content {
        padding: 16px;
    }
}

@media (max-height: 700px) {
    .image-container {
        max-height: 45vh;
    }

    .map-image {
        max-height: 43vh;
    }

    .btn {
        padding: 10px 20px;
    }
}