/* Основные стили */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #2d4263 100%);
    color: #f8fafc;
    height: 100vh;
    overflow: hidden;
    touch-action: manipulation;
}

/* Стили экранов */
.screen {
    display: none;
    height: 100%;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    flex-direction: column;
}

.screen.active {
    display: flex;
}
/* выравнивание контейнеров */
#mainScreen {
    justify-content: center;
    align-items: center;
    padding: 20px;
    gap: 40px;
    font-family: "Rampart One", sans-serif;
    font-weight: 400;
    font-style: normal;
}


#resultScreen {
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    gap: 20px;
}

/* стилизация логотипа названия */
.logo {
    text-align: center;
}

.logo h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo p {
    font-size: 1rem;
    opacity: 0.8;
}

.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

/* плавное появление - скрытие */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); display: none; }
}
.subtitle {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
}

.icon-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

/* Игровой экран */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    margin-bottom: 10px;
}

.stats {
    display: flex;
    gap: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1.1rem;
}

.words-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 0;
}

.words-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.word-row {
    display: flex;
    gap: 5px;
}

.letter-cell {
    width: 40px;
    height: 40px;
    border: 2px solid #4b5563;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s;
}

.letter-cell.revealed {
    background: linear-gradient(45deg, #059669, #10b981);
    border-color: #059669;
    transform: scale(1.05);
}

.word-info {
    text-align: center;
    font-size: 1rem;
    opacity: 0.9;
    margin-top: 10px;
}