body {
    font-family: Arial, sans-serif;
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;

    padding: 20px;
}

.catch-area {
    width: 100%;
    height: 400px;
    background: black;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    margin: 10px 0;
}
.catch-word {
    position: absolute;
    color: white;
    font-size: 28px;
    font-weight: bold;
    user-select: none;
    transition: opacity 0.2s;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
    cursor: pointer; /* делаем указатель */
}
.catch-word.caught {
    color: #00ff88;
    text-shadow: 0 0 20px #00ff88;
}
.stats {
    display: flex;
    gap: 20px;
    margin: 10px 0;
    font-size: 16px;
}
.stats span {
    background: #f0f0f0;
    padding: 4px 12px;
    border-radius: 4px;
}




.container {
    background: white;
    border-radius: 8px;
    width: 80vw;
    max-width: 95%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        flex: 1;
    min-width: 0;
}
/* Обёртка (flex-контейнер) */
.app-wrapper {
    display: flex;
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    align-items: flex-start;
}

.nav-panel{
    width: 160px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fafafa;
    padding: 20px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin-right: 20px; /* отступ от основного контента */
}

.nav-btn {
    display: block;
    padding: 12px 10px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    border-radius: 6px;
    background: transparent;
    transition: background 0.15s, color 0.15s;
    font-weight: normal;
    text-align: left;
    cursor: pointer;
}
.nav-btn:hover {
    background: #e8e8e8;
}
.nav-btn.active {
    background: #2a7de1;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(42, 125, 225, 0.3);
}
/* Боковая панель – фиксированная ширина */
.sidebar {
    width: 200px;
    flex-shrink: 0;
    background: #fafafa;
    border-radius: 8px;
}

.sidebar h3 {
    margin-top: 0;
    font-weight: normal;
    font-size: 18px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.sidebar-item {
    margin: 16px 0;
}

.sidebar-item label {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

#speedSlider {
    width: 100%;
    cursor: pointer;
}

#speedValue {
    font-weight: bold;
    margin-left: 6px;
}



/* --- ОСНОВНОЙ КОНТЕНТ (центр) --- */
.main-content {
    flex: 1;
    min-width: 0;
}
h1 {
    font-size: 24px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: normal;
}

textarea {
    width: 100%;
    height: 200px;
    font-size: 16px;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
}

/* Настройки шрифта */
.font-settings {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 10px 0 15px;
    align-items: center;
    font-size: 14px;
}

.setting {
    display: flex;
    align-items: center;
    gap: 8px;
}

.setting label {
    font-weight: bold;
}

#fontSizeSlider {
    width: 120px;
    cursor: pointer;
}

#fontSizeValue {
    min-width: 30px;
    text-align: center;
}

#fontFamilySelect {
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 4px;
    border: 1px solid #aaa;
    background: white;
    cursor: pointer;
}


.info {
    display: flex;
    justify-content: space-between;
    margin: 10px 0 15px;
    font-size: 16px;
}

.buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#button {
    flex: 1;
    padding: 10px;
    font-size: 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: #ddd;
    transition: background 0.2s;
}

#startBtn {
    background: #5cb85c;
    color: white;
}
#startBtn:hover:not(:disabled) {
    background: #4cae4c;
}
#startBtn:disabled {
    background: #999;
    cursor: not-allowed;
}

#finishBtn {
    background: #f0ad4e;
    color: white;
}
#finishBtn:hover:not(:disabled) {
    background: #ec971f;
}
#finishBtn:disabled {
    background: #999;
    cursor: not-allowed;
}

#resultDisplay {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    font-size: 18px;
    min-height: 50px;
    border: 1px solid #eee;
}

.speed {
    font-size: 28px;
    font-weight: bold;
    color: #2a7de1;
}

.detail {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}