:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --cancel-color: #ff4757;
    --juice-color: #7fc341;
    --volgers-color: #f58127;
    --card-bg: #1e1e1e;
    --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-color: var(--bg-color);
    color: var(--text-color);
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 20px;
    margin-top: 5px;
    flex-shrink: 0;
}

.logo {
    max-width: 90%;
    height: auto;
    max-height: 80px;
    display: block;
    margin: 0 auto;
}

.decks-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    padding-bottom: 20px;
    min-height: 0;
}

.deck {
    flex: 1;
    width: 100%;
    border: none;
    border-radius: 20px;
    background-color: var(--card-bg);
    color: white;
    font-family: var(--font-main);
    cursor: pointer;
    transition: transform 0.1s, filter 0.2s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.deck:active {
    transform: scale(0.98);
}

.deck-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.deck .icon {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.deck h2 {
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.deck .count {
    font-size: 0.9rem;
    opacity: 0.7;
    font-weight: 400;
}

/* Deck Specific Styles */
.cancel-deck {
    border: 2px solid var(--cancel-color);
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.1) 0%, rgba(30, 30, 30, 1) 100%);
}

.cancel-deck h2 {
    color: var(--cancel-color);
}

.juice-deck {
    border: 2px solid var(--juice-color);
    background: linear-gradient(135deg, rgba(127, 195, 65, 0.1) 0%, rgba(30, 30, 30, 1) 100%);
}

.juice-deck h2 {
    color: var(--juice-color);
}

.volgers-deck {
    border: 2px solid var(--volgers-color);
    background: linear-gradient(135deg, rgba(245, 129, 39, 0.1) 0%, rgba(30, 30, 30, 1) 100%);
}

.volgers-deck h2 {
    color: var(--volgers-color);
}

/* Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.card-modal {
    background-color: var(--card-bg);
    width: 100%;
    max-width: 400px;
    aspect-ratio: 2/3;
    border-radius: 24px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid #333;
    position: relative;
}

.overlay.active .card-modal {
    transform: scale(1) translateY(0);
}

.card-content h3 {
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.card-content p {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
}

.tap-hint {
    position: absolute;
    bottom: 20px;
    font-size: 0.9rem;
    color: #666;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}

/* Card Type Specific Styles in Modal */
.card-modal[data-type="cancel"] {
    border-color: var(--cancel-color);
    box-shadow: 0 0 30px rgba(255, 71, 87, 0.2);
}

.card-modal[data-type="cancel"] h3 {
    color: var(--cancel-color);
}

.card-modal[data-type="juice"] {
    border-color: var(--juice-color);
    box-shadow: 0 0 30px rgba(255, 165, 2, 0.2);
}

.card-modal[data-type="juice"] h3 {
    color: var(--juice-color);
}

.card-modal[data-type="volgers"] {
    border-color: var(--volgers-color);
    box-shadow: 0 0 30px rgba(46, 213, 115, 0.2);
}

.card-modal[data-type="volgers"] h3 {
    color: var(--volgers-color);
}

.hidden {
    display: none !important;
}

@media (max-height: 700px) {
    .app-container {
        padding: 10px;
    }

    header {
        margin-top: 10px;
        margin-bottom: 10px;
    }

    .decks-container {
        gap: 10px;
        padding-bottom: 10px;
    }

    .deck h2 {
        font-size: 1.5rem;
    }

    .deck .icon {
        font-size: 2rem;
    }
}

/* Help Button Styles */
.help-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-family: var(--font-main);
}

.help-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.help-btn:active {
    transform: scale(0.95);
}

/* Help Modal Styles */
.help-modal {
    max-width: 600px;
    width: 90%;
    aspect-ratio: unset;
    height: auto;
    max-height: 85vh;
    text-align: left;
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto;
    padding-top: 40px;
}

.help-modal .card-content {
    width: 100%;
}

.help-modal h3 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.help-text p {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: #ddd;
    margin-bottom: 10px;
}

.help-text h3 {
    margin-top: 20px;
    font-size: 1.2rem;
    color: #fff;
}

.help-modal .tap-hint {
    position: sticky;
    bottom: -10px;
    background: var(--card-bg);
    width: 100%;
    text-align: center;
    padding: 10px 0;
    margin-top: 20px;
}