:root {
    --bg-gradient-start: #e0e8e3;
    --bg-gradient-end: #d7e3e8;
    --text-primary: #2c3e50;
    --text-secondary: #546e7a;

    --color-0: #a8d5ba;
    /* Green */
    --color-0-active: #5cdba4;
    --color-1: #f7d2c4;
    /* Rose */
    --color-1-active: #ff9e7a;
    --color-2: #b4cce1;
    /* Blue */
    --color-2-active: #7ec0fa;
    --color-3: #e6e6c9;
    /* Yellow */
    --color-3-active: #fafa90;

    --btn-primary: #2c3e50;
    --btn-text: #ffffff;

    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app {
    width: 100%;
    height: 100%;
    max-width: 800px;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Background Animation */
.zen-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Nav */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    height: 80px;
    z-index: 10;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.stats {
    display: flex;
    gap: 20px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

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

.icon-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    transition: transform 0.2s;
}

.icon-btn:hover {
    transform: scale(1.1);
}

/* Main Container */
#main-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.screen {
    position: absolute;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

.screen.active {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

/* Start Screen */
.title {
    font-size: 4rem;
    font-weight: 300;
    margin-bottom: 10px;
    text-align: center;
    background: linear-gradient(45deg, #2c3e50, #546e7a);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-align: center;
}

.credits {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    text-align: center;
    font-weight: 300;
}

.primary-btn {
    background: var(--btn-primary);
    color: var(--btn-text);
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-main);
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(44, 62, 80, 0.2);
    transition: all 0.3s ease;
}

.primary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(44, 62, 80, 0.3);
}

.primary-btn:active {
    transform: translateY(-1px);
}

/* Game Board */
.status-message {
    font-size: 1.5rem;
    margin-bottom: 30px;
    height: 40px;
    font-weight: 600;
    color: var(--text-secondary);
}

.game-board {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    background: #fff;
    cursor: pointer;
}

.simon-pad {
    position: absolute;
    width: 50%;
    height: 50%;
    transition: all 0.2s;
    opacity: 0.8;
}

.simon-pad:hover {
    opacity: 0.9;
}

.simon-pad.active {
    opacity: 1;
    filter: brightness(1.2);
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5);
}

.top-left {
    background: var(--color-0);
    top: 0;
    left: 0;
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}

.top-right {
    background: var(--color-1);
    top: 0;
    right: 0;
    border-left: 2px solid rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
}

.bottom-left {
    background: var(--color-2);
    bottom: 0;
    left: 0;
    border-right: 2px solid rgba(255, 255, 255, 0.5);
    border-top: 2px solid rgba(255, 255, 255, 0.5);
}

.bottom-right {
    background: var(--color-3);
    bottom: 0;
    right: 0;
    border-left: 2px solid rgba(255, 255, 255, 0.5);
    border-top: 2px solid rgba(255, 255, 255, 0.5);
}

.simon-pad[data-color="0"].active {
    background: var(--color-0-active);
}

.simon-pad[data-color="1"].active {
    background: var(--color-1-active);
}

.simon-pad[data-color="2"].active {
    background: var(--color-2-active);
}

.simon-pad[data-color="3"].active {
    background: var(--color-3-active);
}


.center-piece {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    z-index: 5;
}

.zen-logo {
    font-size: 3rem;
    animation: rotate-slow 20s linear infinite;
}

@keyframes rotate-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (min-width: 600px) {
    .game-board {
        width: 400px;
        height: 400px;
    }

    .center-piece {
        width: 140px;
        height: 140px;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(2px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    /* Align to bottom */
    padding-bottom: 50px;
    /* Space from bottom */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 90%;
    width: 500px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.option-btn {
    background: #f0f4f8;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-family: var(--font-main);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    background: #e0e8e3;
    transform: scale(1.05);
}

.option-btn.correct {
    background: #a8d5ba;
    color: #1e5c38;
}

.option-btn.wrong {
    background: #f7d2c4;
    color: #8c3b28;
}

/* Persistent Credits */
.persistent-credits {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.7;
    z-index: 5;
    pointer-events: none;
}