:root {
    --game-container-width: 1190px;
    --sidebar-fixed-height: clamp(420px, calc(100vh - 260px), 680px);
}

* {
    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;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px 60px;
}

.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.title-with-help {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

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

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.win-condition-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.win-condition-btn:hover,
.win-condition-btn:focus {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.win-condition-popup {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(260px, 80vw);
    background: white;
    color: #333;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    text-align: left;
    z-index: 20;
}

.win-condition-popup h4 {
    margin-bottom: 8px;
}

.win-condition-popup p {
    font-size: 0.95em;
    line-height: 1.4;
}

.screen {
    display: none;
}

.screen.active {
    display: flex;
    flex-direction:column;

}
