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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2E8B57, #228B22);
    min-height: 100vh;
    color: #333;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

header {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

header h1 {
    color: #8B4513;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

header p {
    color: #654321;
    font-size: 1.1em;
    font-style: italic;
}

.game-area {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.crossword-grid {
    display: grid;
    grid-template-columns: repeat(12, 35px);
    grid-template-rows: repeat(12, 35px);
    gap: 2px;
    justify-content: center;
    background: #8B4513;
    padding: 10px;
    border-radius: 10px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.cell {
    position: relative;
    width: 35px;
    height: 35px;
    border: 1px solid #8B4513;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cell.blocked {
    background: #8B4513;
    border: 1px solid #654321;
}

.cell.active {
    background: #FFF8DC;
    border: 1px solid #DAA520;
}

.cell-number {
    position: absolute;
    top: 2px;
    left: 3px;
    font-size: 10px;
    font-weight: bold;
    color: #8B4513;
    z-index: 2;
}

.cell-input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    outline: none;
    caret-color: #8B4513;
}

.cell-input:focus {
    background: #FFE4B5;
    box-shadow: inset 0 0 5px rgba(218, 165, 32, 0.5);
}

.cell-input.highlighted {
    background: #FFE4B5;
    box-shadow: inset 0 0 5px rgba(218, 165, 32, 0.7);
}

.cell-input.correct {
    background: #90EE90;
    color: #006400;
}

.cell-input.incorrect {
    background: #FFB6C1;
    color: #8B0000;
}

.cell-input.hint {
    background: #87CEEB;
    color: #000080;
}

.game-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.clues-section {
    background: #FFF8DC;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #DAA520;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.clues-section h3 {
    color: #8B4513;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.3em;
}

.clues {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.clues-column h4 {
    color: #654321;
    margin-bottom: 10px;
    font-size: 1.1em;
    border-bottom: 2px solid #DAA520;
    padding-bottom: 5px;
}

.clues-column ul {
    list-style: none;
}

.clues-column li {
    margin-bottom: 8px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 5px;
    font-size: 0.9em;
    line-height: 1.3;
}

.clues-column li strong {
    color: #8B4513;
}

.controls {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.controls button {
    background: linear-gradient(145deg, #DAA520, #B8860B);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.controls button:hover {
    background: linear-gradient(145deg, #B8860B, #DAA520);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.controls button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.score {
    text-align: center;
    background: #8B4513;
    color: white;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .game-area {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .crossword-grid {
        grid-template-columns: repeat(12, 25px);
        grid-template-rows: repeat(12, 25px);
        gap: 1px;
    }
    
    .cell {
        width: 25px;
        height: 25px;
    }
    
    .cell-input {
        font-size: 12px;
    }
    
    .cell-number {
        font-size: 8px;
        top: 1px;
        left: 2px;
    }
    
    .clues {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        gap: 8px;
    }
    
    .controls button {
        padding: 10px 15px;
        font-size: 0.8em;
    }
    
    header h1 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .crossword-grid {
        grid-template-columns: repeat(12, 20px);
        grid-template-rows: repeat(12, 20px);
        padding: 5px;
    }
    
    .cell {
        width: 20px;
        height: 20px;
    }
    
    .cell-input {
        font-size: 10px;
    }
    
    .cell-number {
        font-size: 6px;
        top: 0;
        left: 1px;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    header p {
        font-size: 0.9em;
    }
}

footer {
    background: rgba(139, 69, 19, 0.9);
    color: white;
    padding: 20px;
    margin-top: auto;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-content p {
    margin: 0;
    font-size: 1.1em;
    color: #FFF8DC;
}

.social-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-links a {
    color: #FFF8DC;
    text-decoration: none;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-links svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 768px) {
    footer {
        margin-top: 20px;
        padding: 15px;
    }
    
    .footer-content {
        gap: 10px;
    }
    
    .footer-content p {
        font-size: 1em;
    }
    
    .social-links {
        gap: 12px;
    }
    
    .social-links svg {
        width: 20px;
        height: 20px;
    }
}