/* FlexPadel Fortune Wheel Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Demo Page Styles */
.demo-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
}

.demo-header {
    padding: 2rem;
    text-align: center;
    border-bottom: 2px solid #B1FF26;
}

.demo-header h1 {
    font-size: 3rem;
    color: #B1FF26;
    margin-bottom: 0.5rem;
}

.demo-content {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Floating Gift Icon */
.fortune-gift-icon {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #B1FF26 0%, #8fd91f 100%);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(177, 255, 38, 0.4);
    transition: all 0.3s ease;
    z-index: 9998;
    opacity: 0;
    transform: scale(0) translateY(20px);
    animation: fadeInScale 0.6s ease-out forwards, pulse 2s infinite 0.6s;
}

.fortune-gift-icon:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 12px 48px rgba(177, 255, 38, 0.6);
}

.fortune-gift-icon svg {
    width: 35px;
    height: 35px;
    fill: #0a0a0a;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0) translateY(20px);
    }
    60% {
        transform: scale(1.1) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Modal Overlay */
.fortune-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

.fortune-modal-overlay::-webkit-scrollbar {
    width: 0;
    display: none;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Modal Content */
.fortune-modal {
    background: #1a1a1a;
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    min-height: 600px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    border: 2px solid #B1FF26;
    box-shadow: 0 20px 60px rgba(177, 255, 38, 0.2);
}

.fortune-modal::-webkit-scrollbar {
    width: 8px;
}

.fortune-modal::-webkit-scrollbar-track {
    background: transparent;
}

.fortune-modal::-webkit-scrollbar-thumb {
    background: rgba(177, 255, 38, 0.3);
    border-radius: 4px;
}

.fortune-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(177, 255, 38, 0.5);
}

.fortune-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #B1FF26;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.fortune-close:hover {
    transform: rotate(90deg);
}

.fortune-title {
    text-align: center;
    font-size: 1.8rem;
    color: #B1FF26;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* Wheel Container */
.fortune-wheel-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 2rem;
}

.fortune-wheel-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    background: radial-gradient(circle, rgba(201, 169, 97, 0.1) 0%, transparent 70%);
}

.fortune-wheel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 60px rgba(201, 169, 97, 0.5), 0 0 100px rgba(201, 169, 97, 0.3);
}

.fortune-wheel.idle {
    animation: slowRotate 20s linear infinite;
}

@keyframes slowRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fortune-wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #E8D4A0 0%, #C9A961 50%, #A88B4A 100%);
    border-radius: 50%;
    border: 5px solid #E8D4A0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #2C2416;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 2px 5px rgba(255, 255, 255, 0.3);
}

.fortune-wheel-pointer {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 50px solid #E8D4A0;
    z-index: 11;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
}

/* Form Styles */
.fortune-form {
    margin-top: 1.5rem;
}

.fortune-form-group {
    margin-bottom: 1rem;
}

.fortune-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #B1FF26;
    font-weight: 600;
    font-size: 0.95rem;
}

.fortune-form-group input {
    width: 100%;
    padding: 0.75rem;
    background: #0a0a0a;
    border: 2px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.fortune-form-group input:focus {
    outline: none;
    border-color: #B1FF26;
}

.fortune-form-group input[type="tel"] {
    font-family: monospace;
    letter-spacing: 0.5px;
}

.fortune-form-group input:invalid {
    border-color: #ff4444;
}

.fortune-form-group input:valid {
    border-color: #4CAF50;
}

.fortune-checkbox-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.fortune-checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    margin-top: 0.25rem;
}

.fortune-checkbox-group label {
    margin: 0;
    font-size: 0.9rem;
    color: #ccc;
    font-weight: 500;
    line-height: 1.5;
}

.fortune-spin-btn {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, #B1FF26 0%, #8fd91f 100%);
    border: none;
    border-radius: 12px;
    color: #0a0a0a;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

.fortune-spin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(177, 255, 38, 0.4);
}

.fortune-spin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Result Display */
.fortune-result {
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #B1FF26 0%, #8fd91f 100%);
    border-radius: 16px;
    color: #0a0a0a;
    margin-top: 1.5rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fortune-result h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.fortune-result p {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
    line-height: 1.6;
}

.fortune-result p:first-of-type {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.9;
}

.fortune-result-branch {
    font-weight: 700;
    font-size: 1.5rem;
}

/* Already Played Message */
.fortune-already-played {
    text-align: center;
    padding: 2rem;
}

.fortune-already-played h3 {
    color: #B1FF26;
    margin-bottom: 1.5rem;
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.fortune-already-played p {
    color: #ccc;
    margin-bottom: 0.75rem;
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.6;
}

.fortune-already-played p strong {
    font-weight: 700;
    color: #fff;
}

/* Error Message */
.fortune-error {
    background: #ff4444;
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.95rem;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .fortune-modal {
        padding: 1.5rem;
    }

    .fortune-title {
        font-size: 1.5rem;
    }

    .fortune-gift-icon {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }

    .demo-header h1 {
        font-size: 2rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }
}

/* Loading State */
.fortune-loading {
    text-align: center;
    padding: 2rem;
    color: #B1FF26;
}

.fortune-spinner {
    border: 4px solid #333;
    border-top: 4px solid #B1FF26;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Branch Selection Buttons */
.fortune-branch-btn {
    padding: 1.2rem 2rem;
    background: rgba(10, 10, 10, 0.85);
    border: 3px solid rgba(10, 10, 10, 0.9);
    border-radius: 12px;
    color: #B1FF26;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    min-width: 140px;
    max-width: 280px;
    letter-spacing: 0.3px;
    font-family: 'Inter', sans-serif;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
}

.fortune-branch-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(10, 10, 10, 0.5);
    border-color: #000;
    background: rgba(0, 0, 0, 0.95);
}

.fortune-branch-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#branch-confirmation {
    padding: 1.5rem;
    background: rgba(10, 10, 10, 0.15);
    border-radius: 12px;
    border: 2px solid #0a0a0a;
}

#branch-confirmation p {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin: 0.5rem 0 !important;
    word-wrap: break-word;
}

#branch-confirmation p:first-child {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
}

#branch-confirmation p:nth-child(2) {
    font-size: 1.4rem !important;
    font-weight: 800 !important;
}

#fortune-result-container {
    min-height: 50px;
}

.fortune-form[style*="display: none"] {
    display: none !important;
    height: 0;
    overflow: hidden;
}
