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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #E8E8E8 0%, #F5F5F5 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 600px;
    width: 100%;
    flex: 1;
    justify-content: center;
    padding: 20px;
}

.wheel-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    max-width: 500px;
    max-height: 500px;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.pointer {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 18px solid transparent;
    border-right: 18px solid transparent;
    border-top: 35px solid #C93D2E;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.spin-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C93D2E 0%, #A33126 100%);
    border: 5px solid white;
    color: white;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.spin-button:hover {
    transform: translate(-50%, -50%) scale(1.05);
}

.spin-button:active {
    transform: translate(-50%, -50%) scale(0.95);
}

.spin-button:disabled {
    background: linear-gradient(135deg, #999 0%, #777 100%);
    cursor: not-allowed;
    opacity: 0.6;
}

.result-display {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    min-width: 250px;
}

.result-label {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.result-values {
    display: flex;
    justify-content: space-around;
    gap: 40px;
    margin-top: 20px;
}

.result-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.result-item-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.result-item-value {
    font-size: 48px;
    font-weight: bold;
    color: #D64530;
}

/* Header */
.app-header {
    background: #FFD700;
    color: #000;
    padding: 12px 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.header-logo {
    height: 50px;
    flex-shrink: 0;
}

.header-content {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.app-title {
    font-size: 28px;
    margin: 0;
    font-weight: bold;
    color: #000;
    line-height: 1.2;
}

.app-subtitle {
    font-size: 11px;
    margin: 2px 0 0 0;
    color: #333;
    line-height: 1.2;
}

.info-button {
    background: none;
    border: none;
    color: #000;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-button:hover {
    opacity: 0.7;
}

/* Footer */
.app-footer {
    background: #000;
    padding: 20px;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    color: #fff;
    width: 100%;
}

.footer-logo {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    margin-bottom: 15px;
}

.app-footer p {
    margin: 5px 0;
    font-size: 14px;
}

.footer-small {
    font-size: 12px;
    color: #ccc;
}

/* Overlay and Popup */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.overlay.active {
    display: flex;
}

.popup {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.close-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: #f0f0f0;
    color: #333;
}

.popup h2 {
    margin-top: 0;
    color: #000;
    font-size: 24px;
}

.popup-content {
    color: #333;
    line-height: 1.6;
}

.popup-content p {
    margin: 15px 0;
}

.popup-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.popup-content li {
    margin: 8px 0;
}

.popup-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #000;
    text-align: center;
    font-weight: bold;
}

/* Mobile optimizations */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .pointer {
        border-left-width: 15px;
        border-right-width: 15px;
        border-top-width: 30px;
    }

    .spin-button {
        width: 70px;
        height: 70px;
        font-size: 12px;
    }

    .result-display {
        padding: 20px;
        min-width: 200px;
    }

    .result-item-value {
        font-size: 36px;
    }

    .result-values {
        gap: 20px;
    }

    .app-title {
        font-size: 18px;
    }

    .app-subtitle {
        font-size: 10px;
    }

    .header-logo {
        height: 40px;
    }

    .footer-logo {
        max-height: 60px;
    }

    .popup {
        padding: 20px;
        max-height: 90vh;
    }
}
