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

:root {
    --bg-primary: #0d1329;
    --bg-secondary: #1a2140;
    --bg-card: #252b4a;
    --accent-purple: #9c27b0;
    --accent-purple-dark: #7b1fa2;
    --accent-pink: #e91e63;
    --accent-pink-dark: #c2185b;
    --text-primary: #ffffff;
    --text-secondary: #8892b0;
    --text-placeholder: #5a6380;
    --success: #4ade80;
    --error: #f87171;
    --onboarding-accent: var(--accent-purple);
    --onboarding-accent-dark: var(--accent-purple-dark);
    --onboarding-shadow: rgba(156, 39, 176, 0.3);
    --onboarding-shadow-hover: rgba(156, 39, 176, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(180deg, var(--bg-primary) 0%, #0a0f1f 100%);
    min-height: 100vh;
    min-height: var(--app-height, 100dvh);
    color: var(--text-primary);
    overflow-x: hidden;
}

.app {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: var(--app-height, 100dvh);
    position: relative;
}

.screen {
    display: none;
    flex-direction: column;
    min-height: 100vh;
    min-height: var(--app-height, 100dvh);
    padding: 40px 24px;
    padding-top: calc(40px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.title {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
}

/* Back Button */
.btn-back {
    position: absolute;
    top: calc(40px + env(safe-area-inset-top, 0px));
    left: 24px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    z-index: 10;
}

/* Game Screen */
.game-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding-top: 20px;
}

.card-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.statement-card {
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);
    border-radius: 24px;
    padding: 40px 30px;
    width: 100%;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 8px 40px rgba(156, 39, 176, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

@media (hover: hover) {
    .statement-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 50px rgba(156, 39, 176, 0.5);
    }
}

.statement-card:active {
    transform: translateY(0) scale(0.98);
}

.card-header {
    font-size: 18px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.card-text {
    font-size: 26px;
    font-weight: 700;
    color: white;
    line-height: 1.4;
}

.card-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 20px;
}

/* Punishment Section */
.punishment-section {
    padding: 30px 0;
}

.btn-punishment {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-pink-dark) 100%);
    border: none;
    color: white;
    padding: 20px;
    border-radius: 30px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(233, 30, 99, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

@media (hover: hover) {
    .btn-punishment:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(233, 30, 99, 0.4);
    }
}

.btn-punishment:active {
    transform: translateY(0);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 100;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border-radius: 24px;
    padding: 40px 30px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-pink);
    margin-bottom: 20px;
}

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

.btn-close-modal {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-purple-dark) 100%);
    border: none;
    color: white;
    padding: 16px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(156, 39, 176, 0.3);
}

@media (hover: hover) {
    .btn-close-modal:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(156, 39, 176, 0.4);
    }
}

/* Card flip animation */
@keyframes cardFlip {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg); }
    100% { transform: rotateY(0deg); }
}

.statement-card.flip {
    animation: cardFlip 0.4s ease;
}

/* Bottom Section */
.bottom-section {
    padding: 20px 0;
    margin-top: auto;
}

/* Play Button */
.btn-play {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-pink) 0%, var(--accent-pink-dark) 100%);
    border: none;
    color: white;
    padding: 18px;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 59, 111, 0.3);
}

@media (hover: hover) {
    .btn-play:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 25px rgba(255, 59, 111, 0.4);
    }
}

.btn-play:active {
    transform: translateY(0);
}

.btn-play:disabled {
    background: var(--bg-card);
    box-shadow: none;
    cursor: not-allowed;
}

.play-icon {
    font-size: 20px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .app {
        max-width: 100%;
    }

    .screen {
        padding: 20px 12px;
        padding-top: calc(20px + env(safe-area-inset-top, 0px));
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .btn-back {
        top: 20px;
        left: 12px;
        font-size: 20px;
        padding: 6px;
    }

    .statement-card {
        min-height: 200px;
        padding: 24px 20px;
        margin: 10px;
        border-radius: 20px;
    }

    .card-header {
        font-size: 14px;
        margin-bottom: 12px;
        letter-spacing: 1px;
    }

    .card-text {
        font-size: 18px;
        line-height: 1.3;
    }

    .card-hint {
        font-size: 12px;
        margin-top: 12px;
    }

    .punishment-section {
        padding: 16px 0;
    }

    .btn-punishment {
        padding: 16px;
        border-radius: 24px;
        font-size: 16px;
        gap: 8px;
    }

    .modal-content {
        padding: 30px 24px;
        border-radius: 20px;
    }

    .modal-icon {
        font-size: 48px;
        margin-bottom: 16px;
    }

    .modal-title {
        font-size: 24px;
        margin-bottom: 16px;
    }

    .modal-text {
        font-size: 16px;
        line-height: 1.4;
        margin-bottom: 20px;
    }

    .btn-close-modal {
        padding: 14px;
        border-radius: 24px;
        font-size: 16px;
    }
}

/* Responsive Height */
@media (max-height: 700px) {
    .screen {
        padding: 20px;
    }

    .statement-card {
        min-height: 220px;
        padding: 30px 24px;
    }

    .card-text {
        font-size: 22px;
    }

    .punishment-section {
        padding: 20px 0;
    }
}

@media (max-height: 600px) {
    .statement-card {
        min-height: 180px;
        padding: 24px 20px;
    }

    .card-header {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .card-text {
        font-size: 20px;
    }
}

/* Tablet and larger */
@media (min-width: 768px) {
    .app {
        max-width: 100%;
    }

    .screen {
        padding: 50px 40px;
    }

    .statement-card {
        min-height: 320px;
        padding: 50px 40px;
    }

    .card-text {
        font-size: 30px;
    }

    .btn-punishment {
        padding: 24px;
        font-size: 22px;
    }

    .modal-content {
        padding: 50px 40px;
    }

    .modal-title {
        font-size: 32px;
    }

    .modal-text {
        font-size: 22px;
    }
}
