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

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(to bottom, #1a1a2e, #16213e);
    font-family: Arial, sans-serif;
}

.game-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.game-container {
    position: relative;
    min-width: 1000px;
    min-height: 600px;
    background: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

h1 {
    margin: 0;
    color: #333;
    font-size: 32px;
    text-align: center;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    margin-bottom: 20px;
}

#score {
    font-size: 24px;
    color: #333;
    text-align: left;
}

.new-game-button {
    background: #2196F3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.new-game-button:hover {
    background: #1976D2;
}

.game-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
    justify-content: space-between;
    padding: 0 20px;
}

.grid-container {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

#grid {
    display: grid;
    gap: 1px;
    background: #333;
    padding: 1px;
    border-radius: 5px;
    width: fit-content;
    height: fit-content;
}

.cell {
    width: 35px;
    height: 35px;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    position: relative;
    text-transform: uppercase;
}

.cell.blocked {
    background: #333;
    cursor: default;
}

.cell.selected {
    background: #2196F3;
    color: white;
}

.cell.found {
    background: #4CAF50;
    color: white;
}

.cell-number {
    position: absolute;
    top: 1px;
    left: 2px;
    font-size: 0.6rem;
    color: #666;
}

.clues-container {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 5px;
    height: fit-content;
}

.clues-section {
    background: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.clues-section h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2rem;
    border-bottom: 2px solid #2196F3;
    padding-bottom: 5px;
}

.clue {
    margin-bottom: 8px;
    cursor: pointer;
    transition: color 0.2s;
    font-size: 0.9rem;
    line-height: 1.4;
}

.clue:hover {
    color: #2196F3;
}

.clue.found {
    color: #4CAF50;
    text-decoration: line-through;
}

#message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 5px;
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
    text-align: center;
    min-width: 200px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#message.error {
    opacity: 1;
    visibility: visible;
    background: rgba(255, 0, 0, 0.8);
}

#message.success {
    opacity: 1;
    visibility: visible;
    background: rgba(76, 175, 80, 0.8);
}

.back-button {
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 1200px) {
    .game-content {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .clues-container {
        width: 100%;
        max-width: 600px;
    }
}

@media (max-width: 600px) {
    .cell {
        width: 30px;
        height: 30px;
        font-size: 1rem;
    }
    
    .cell-number {
        font-size: 0.6rem;
    }
}

.puzzle-selection {
    width: 100%;
    padding: 20px;
    text-align: center;
}

.puzzle-selection h2 {
    color: #333;
    font-size: 24px;
    margin-bottom: 30px;
}

.puzzle-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.puzzle-option {
    background: #f5f5f5;
    border: 2px solid #2196F3;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.puzzle-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.puzzle-option h3 {
    color: #2196F3;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.puzzle-option p {
    color: #666;
    margin: 0;
    font-size: 1rem;
}

.game-screen {
    width: 100%;
} 