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

body {
    font-family: 'American Typewriter', 'Courier New', monospace;
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    min-height: 100vh;
    color: #2d3748;
    overflow-x: hidden;
}

/* Full Page Container */
.container {
    max-width: 100%;
    min-height: 100vh;
    margin: 0;
    background: #ffffff;
    padding: 0;
    box-shadow: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

/* Header - Full Width */
header {
    text-align: center;
    padding: 30px 40px;
    background: #fffff4;
    border-bottom: 3px solid #2d3748;
}

.main-logo {
    max-width: 350px;
    width: 100%;
    height: auto;
    margin-bottom: 12px;
}

.tagline {
    font-size: 16px;
    color: #2d3748;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.tagline .highlight {
    background: #c53030;
    color: #fffff4;
    padding: 2px 8px;
    border-radius: 3px;
}

/* Main Content Area - Two Columns */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    flex: 1;
    min-height: calc(100vh - 200px);
}

/* LEFT COLUMN - Book Excerpt */
.left-column {
    background: #ffffff;
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
    border-right: 3px solid #2d3748;
    position: relative;
}

.mascot-container {
    text-align: center;
    margin-bottom: 30px;
}

.mascot {
    width: 150px;
    height: 150px;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.excerpt-container {
    background: #fffff4;
    border: 3px solid #2d3748;
    border-radius: 4px;
    padding: 40px;
    flex: 1;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.excerpt-label {
    font-size: 14px;
    font-weight: bold;
    color: #c53030;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.excerpt {
    font-size: 18px;
    line-height: 2;
    color: #1a202c;
    font-family: 'American Typewriter', 'Courier New', serif;
    flex: 1;
}

.redacted {
    background: #1a202c;
    color: transparent;
    border-radius: 4px;
    padding: 2px 5px;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* RIGHT COLUMN - Game Controls */
.right-column {
    background: #fffff4;
    padding: 50px 60px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

/* Game Info */
.game-info {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.attempts {
    background: #2d3748;
    color: #fffff4;
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    font-size: 20px;
}

.attempts .label {
    opacity: 0.9;
}

.attempts .value {
    font-weight: bold;
    margin-left: 8px;
}

/* Guess Input Section */
.guess-container {
    position: relative;
    margin-bottom: 35px;
}

.guess-label {
    display: block;
    font-size: 18px;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 12px;
}

#guess-input {
    width: 100%;
    padding: 18px;
    font-size: 17px;
    font-family: 'American Typewriter', 'Courier New', monospace;
    border: 3px solid #2d3748;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s;
    background: #fffff4;
}

#guess-input:focus {
    border-color: #c53030;
    box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.1);
}

.autocomplete-list {
    position: absolute;
    top: calc(100% - 40px);
    left: 0;
    right: 0;
    background: #fffff4;
    border: 3px solid #2d3748;
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.autocomplete-list.show {
    display: block;
}

.autocomplete-item {
    padding: 15px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #e2e8f0;
    font-family: 'American Typewriter', 'Courier New', monospace;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: #edf2f7;
}

.btn-submit {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    font-weight: bold;
    color: #fffff4;
    background: #c53030;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
    font-family: 'American Typewriter', 'Courier New', monospace;
    box-shadow: 0 4px 6px rgba(197, 48, 48, 0.3);
}

.btn-submit:hover {
    background: #9b2c2c;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(197, 48, 48, 0.4);
}

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

.btn-submit:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
}

/* Guesses Container */
.guesses-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    overflow-y: auto;
}

.guess-result {
    border-radius: 12px;
    padding: 20px;
    background: #fffff4;
    border: 2px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.guess-title {
    font-weight: bold;
    margin-bottom: 15px;
    color: #1a202c;
    font-size: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.attributes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.attribute {
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.attribute:hover {
    transform: scale(1.05);
}

.attribute-label {
    font-size: 10px;
    opacity: 0.8;
    margin-bottom: 6px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.attribute-value {
    font-weight: bold;
    font-size: 14px;
}

.correct {
    background: #48bb78;
    color: #fffff4;
    border-color: #38a169;
}

.incorrect {
    background: #c53030;
    color: #fffff4;
    border-color: #9b2c2c;
}

.close {
    background: #ecc94b;
    color: #1a202c;
    border-color: #d69e2e;
}

/* Game Over Screen - Overlay */
.game-over {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 32, 44, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.game-over.hidden {
    display: none;
}

.game-over-content {
    background: #fffff4;
    border-radius: 20px;
    padding: 50px;
    max-width: 600px;
    width: 100%;
    text-align: center;
    border: 3px solid #2d3748;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    position: relative;
    animation: slideUp 0.4s ease;
}

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

/* Close Button */
.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #e2e8f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s;
    color: #2d3748;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.close-modal:hover {
    background: #cbd5e0;
    transform: rotate(90deg);
}

.close-modal:active {
    transform: rotate(90deg) scale(0.9);
}

.game-over h2 {
    margin-bottom: 20px;
    color: #1a202c;
    font-size: 36px;
}

.game-over p {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2d3748;
}

.correct-answer {
    background: #edf2f7;
    padding: 25px;
    border-radius: 10px;
    margin: 25px 0;
    border: 2px solid #cbd5e0;
}

.btn-share {
    width: 100%;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    color: #fffff4;
    background: #2d3748;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-bottom: 15px;
    transition: all 0.3s;
    font-family: 'American Typewriter', 'Courier New', monospace;
    box-shadow: 0 4px 6px rgba(45, 55, 72, 0.3);
}

.btn-share:hover {
    background: #1a202c;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(45, 55, 72, 0.4);
}

.btn-play-again {
    width: 100%;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    color: #fffff4;
    background: #c53030;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'American Typewriter', 'Courier New', monospace;
    box-shadow: 0 4px 6px rgba(197, 48, 48, 0.3);
}

.btn-play-again:hover {
    background: #9b2c2c;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(197, 48, 48, 0.4);
}

/* Countdown Timer */
.countdown {
    margin-top: 25px;
    padding: 20px;
    background: #edf2f7;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #cbd5e0;
}

.countdown-label {
    font-size: 14px;
    color: #718096;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.countdown-time {
    font-size: 32px;
    font-weight: bold;
    color: #2d3748;
    font-family: 'American Typewriter', 'Courier New', monospace;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background: #fffff4;
    border-top: 3px solid #2d3748;
}

.footer-text {
    color: #718096;
    font-size: 14px;
}

/* RESPONSIVE DESIGN */

/* Tablet */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .left-column {
        border-right: none;
        border-bottom: 3px solid #2d3748;
        min-height: 60vh;
    }
    
    .right-column {
        max-height: none;
    }
    
    .mascot {
        width: 120px;
        height: 120px;
    }
    
    .left-column,
    .right-column {
        padding: 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    header {
        padding: 20px;
    }
    
    .main-logo {
        max-width: 250px;
    }
    
    .tagline {
        font-size: 14px;
    }
    
    .left-column,
    .right-column {
        padding: 25px;
    }
    
    .mascot {
        width: 100px;
        height: 100px;
    }
    
    .excerpt-container {
        padding: 25px;
    }
    
    .excerpt {
        font-size: 16px;
        line-height: 1.8;
    }
    
    .attributes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .game-over-content {
        padding: 30px;
    }
    
    .game-over h2 {
        font-size: 28px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .main-logo {
        max-width: 200px;
    }
    
    .left-column,
    .right-column {
        padding: 20px;
    }
    
    .mascot {
        width: 80px;
        height: 80px;
    }
    
    .attributes-grid {
        grid-template-columns: 1fr;
    }
    
    .excerpt {
        font-size: 15px;
    }
    
    .game-over-content {
        padding: 25px;
    }
}

/* Scrollbar Styling */
.right-column::-webkit-scrollbar,
.autocomplete-list::-webkit-scrollbar,
.guesses-container::-webkit-scrollbar {
    width: 8px;
}

.right-column::-webkit-scrollbar-track,
.autocomplete-list::-webkit-scrollbar-track,
.guesses-container::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 4px;
}

.right-column::-webkit-scrollbar-thumb,
.autocomplete-list::-webkit-scrollbar-thumb,
.guesses-container::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.right-column::-webkit-scrollbar-thumb:hover,
.autocomplete-list::-webkit-scrollbar-thumb:hover,
.guesses-container::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}
