* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    transition: all 0.3s ease;
}

body.dark-theme {
    background: #000;
    color: #fff;
}

body.dark-theme .question-container {
    background: #000;
    color: #fff;
    border: 2px solid #fff;
}

body.dark-theme .answer-section,
body.dark-theme .previous-answer {
    background: #000;
    color: #fff;
    border: 2px solid #fff;
}

body.dark-theme .btn {
    background: #fff;
    color: #000;
}

body.dark-theme .btn:hover {
    background: #ccc;
}

body.dark-theme .answer-content {
    background: #111;
    border-left-color: #fff;
}

body.dark-theme .stats span {
    background: rgba(255,255,255,0.2);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.settings {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
}

.settings select {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
}

.btn.fullscreen {
    background: #9C27B0;
    color: white;
}

.btn.fullscreen:hover {
    background: #7B1FA2;
}

.btn.theme {
    background: #607D8B;
    color: white;
}

.btn.theme:hover {
    background: #455A64;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.question-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 600px;
}

.category {
    font-size: 1rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question {
    font-size: 2rem;
    line-height: 1.4;
    margin-bottom: 20px;
    font-weight: 300;
    color: #333;
}

.question-info {
    font-size: 0.9rem;
    color: #888;
}

.controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.btn.primary {
    background: #4CAF50;
    color: white;
}

.btn.primary:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn.secondary {
    background: #2196F3;
    color: white;
}

.btn.secondary:hover {
    background: #1976D2;
    transform: translateY(-2px);
}

.btn.tertiary {
    background: #FF9800;
    color: white;
}

.btn.tertiary:hover {
    background: #F57C00;
    transform: translateY(-2px);
}

.answer-section, .previous-answer {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
}

.answer-section h3, .previous-answer h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

#answer-input {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 20px;
}

#answer-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.answer-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.answer-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    line-height: 1.5;
    border-left: 4px solid #4CAF50;
}

.answer-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-align: center;
}

footer {
    margin-top: auto;
    text-align: center;
    color: white;
    padding: 20px 0;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    font-size: 1rem;
}

.stats span {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Fullscreen overlay styles */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    cursor: pointer;
}

.fullscreen-overlay.active {
    display: flex;
}

.fullscreen-overlay.dark {
    background: #000;
    color: #fff;
}

.fullscreen-question {
    font-size: 3rem;
    text-align: center;
    padding: 40px;
    line-height: 1.4;
    font-weight: 300;
    max-width: 90vw;
    word-wrap: break-word;
}


@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    .question {
        font-size: 1.5rem;
    }
    
    .question-container {
        padding: 30px 20px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .fullscreen-question {
        font-size: 2rem;
        padding: 20px;
    }
    
    .settings {
        flex-direction: column;
        gap: 10px;
    }
}
