/* Reset and Base Styles */
* {
    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;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 48px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.title h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.title p {
    color: #666;
    font-size: 1.1rem;
    font-weight: 300;
}

.stats {
    display: flex;
    gap: 30px;
}

.stat {
    text-align: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
    min-width: 80px;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Game Area */
.game-area {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto auto auto auto;
    gap: 30px;
    grid-template-areas: 
        "hangman concept"
        "word word"
        "letters letters"
        "controls controls";
}

/* Hangman Visual */
.hangman-container {
    grid-area: hangman;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.hangman-svg {
    width: 100%;
    max-width: 250px;
    height: auto;
}

.hangman-part {
    animation: drawLine 0.5s ease-in-out;
}

/* Concept Section */
.concept-section {
    grid-area: concept;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.concept-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.bulb-icon {
    font-size: 24px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.3);
}

.concept-header h2 {
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
}

.concept-description {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Word Section */
.word-section {
    grid-area: word;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    backdrop-filter: blur(10px);
}

.word-section h3 {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.word-display {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.letter-blank, .letter-filled {
    width: 40px;
    height: 50px;
    border-bottom: 3px solid #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.letter-filled {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 8px 8px 0 0;
    animation: letterReveal 0.5s ease-out;
}

.space {
    width: 20px;
    border: none;
}

/* Letter Selection */
.letter-section {
    grid-area: letters;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    backdrop-filter: blur(10px);
}

.letter-section h3 {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.alphabet {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(45px, 1fr));
    gap: 10px;
    max-width: 600px;
    margin: 0 auto;
}

.letter-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #667eea;
    background: white;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.letter-btn:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.letter-btn:disabled {
    background: #f0f0f0;
    color: #ccc;
    border-color: #ddd;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.letter-btn.wrong {
    background: #ff6b6b;
    color: white;
    border-color: #ff6b6b;
}

.letter-btn.correct {
    background: #51cf66;
    color: white;
    border-color: #51cf66;
}

/* Controls */
.controls {
    grid-area: controls;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.btn-icon {
    font-size: 1.2rem;
}

.btn-hint {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: white;
}

.btn-hint:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
}

.btn-new-game {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-new-game:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-categories {
    background: linear-gradient(135deg, #51cf66, #40c057);
    color: white;
}

.btn-categories:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(81, 207, 102, 0.4);
}

.btn-close {
    background: linear-gradient(135deg, #868e96, #495057);
    color: white;
}

.btn-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(134, 142, 150, 0.4);
}

.btn-filter {
    background: linear-gradient(135deg, #9c88ff, #8c7cf0);
    color: white;
}

.btn-filter:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(156, 136, 255, 0.4);
}

.btn-apply {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-apply:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-reset {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.modal-content p {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #555;
    line-height: 1.6;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.category-btn {
    padding: 15px 20px;
    border: 2px solid #667eea;
    background: white;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover, .category-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

/* Answer Count Styles */
.answer-count {
    margin-left: auto;
}

.count-badge {
    background: linear-gradient(135deg, #51cf66, #40c057);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(81, 207, 102, 0.3);
}

/* Filter Modal Styles */
.filter-options {
    text-align: left;
    margin-bottom: 20px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    max-width: 100px;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
}

.input-suffix {
    color: #666;
    font-weight: 500;
}

.filter-stats {
    background: #f8f9ff;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 20px;
}

.filter-stats h4 {
    margin-bottom: 10px;
    color: #333;
}

.filter-stats p {
    margin-bottom: 5px;
    color: #555;
}

.filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* Animations */
@keyframes drawLine {
    from {
        stroke-dasharray: 100;
        stroke-dashoffset: 100;
    }
    to {
        stroke-dasharray: 100;
        stroke-dashoffset: 0;
    }
}

@keyframes letterReveal {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .title h1 {
        font-size: 2rem;
    }
    
    .game-area {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "hangman"
            "concept"
            "word"
            "letters"
            "controls";
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .alphabet {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .letter-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .concept-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .answer-count {
        margin-left: 0;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .word-display {
        gap: 4px;
    }
    
    .letter-blank, .letter-filled {
        width: 30px;
        height: 40px;
        font-size: 1.4rem;
    }
    
    .alphabet {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }
    
    .letter-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
} 