/* Red Stripe Spin Wheel - Optimized Styles v3.1 */
.rswpc-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Form Container */
#rswpc-form-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px 30px;
    max-width: 500px;
    margin: 0 auto;
}

#rswpc-form-container h2 {
    color: #d32f2f;
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 700;
}

.rswpc-field-wrap {
    position: relative;
    margin-bottom: 25px;
}

.rswpc-field-wrap input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fafafa;
    box-sizing: border-box;
}

.rswpc-field-wrap input:focus {
    border-color: #d32f2f;
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
    background: #ffffff;
}

.error-message {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 5px;
    display: block;
    text-align: left;
    min-height: 18px;
}

.rswpc-checkbox {
    display: flex;
    align-items: flex-start;
    margin: 20px 0;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    line-height: 1.5;
    color: #333333;
}

.rswpc-checkbox input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #d32f2f;
}

.rswpc-submit-btn {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 25px;
    width: 100%;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rswpc-submit-btn:hover {
    background: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.4);
}

/* Wheel Container - Simplified */
#rswpc-wheel-container {
    padding: 40px 20px;
    background: #f5f5f5;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
    display: none;
}

.wheel-wrapper {
    position: relative;
    display: inline-block;
    margin: 0 auto;
    background: white;
    border-radius: 50%;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

#wheel-canvas {
    display: block;
    margin: 0 auto;
    cursor: default;
    max-width: 100%;
    height: auto;
}

/* Result Container */
#result-container {
    background: white;
    padding: 40px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    display: none;
    animation: slideUp 0.5s ease-out;
}

.result-content {
    text-align: center;
}

.win-badge {
    font-size: 42px;
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 20px;
    animation: bounce 1s ease-out;
}

.lose-badge {
    font-size: 32px;
    font-weight: bold;
    color: #666;
    margin-bottom: 20px;
}

.result-message {
    font-size: 24px;
    margin: 20px 0;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
}

.card-code-container {
    margin: 30px 0;
}

.card-code-container p {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
}

.card-code {
    font-size: 36px;
    font-weight: bold;
    color: #d32f2f;
    padding: 25px;
    background: #fff5f5;
    border: 3px dashed #d32f2f;
    border-radius: 12px;
    letter-spacing: 3px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    animation: glow-pulse 2s infinite;
}

/* Physical Prize Notice */
.physical-prize-notice {
    background: #fff3cd;
    border: 2px solid #ffeaa7;
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
}

.physical-prize-notice p:first-child {
    font-size: 24px;
    color: #d32f2f;
    margin-bottom: 20px;
    font-weight: bold;
}

.prize-name {
    font-size: 42px;
    font-weight: bold;
    color: #d32f2f;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: glow-pulse 2s infinite;
}

.claim-message {
    font-size: 18px;
    color: #666;
    font-weight: 500;
    margin-top: 20px;
    text-align: center;
}

.save-code-message {
    color: #d32f2f;
    font-weight: bold;
    font-size: 16px;
    margin-top: 10px;
}

.complete-button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 30px;
}

.complete-button:hover {
    background: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

/* Password Form */
.rswpc-password-form {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
}

.rswpc-password-form h2 {
    color: #d32f2f;
    margin-bottom: 25px;
    font-size: 24px;
}

.rswpc-password-form input[type="password"] {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.rswpc-password-form input[type="password"]:focus {
    border-color: #d32f2f;
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
}

.rswpc-password-form button {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.rswpc-password-form button:hover {
    background: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
}

/* Error Message */
.rswpc-error {
    color: #d32f2f;
    padding: 15px;
    margin: 15px 0;
    background: #ffebee;
    border-radius: 8px;
    border-left: 4px solid #d32f2f;
    text-align: left;
    font-weight: 500;
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}

@keyframes glow-pulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(211, 47, 47, 0.2);
    }
    50% { 
        box-shadow: 0 0 30px rgba(211, 47, 47, 0.4);
    }
}

.win-animation {
    animation: winPulse 1s ease-out;
}

.lose-animation {
    animation: loseShake 0.5s ease-out;
}

@keyframes winPulse {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes loseShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #wheel-canvas {
        width: 100%;
        max-width: 450px;
    }
    
    .wheel-wrapper {
        padding: 15px;
        width: 95%;
        max-width: 480px;
    }
    
    .win-badge {
        font-size: 32px;
    }
    
    .card-code {
        font-size: 24px;
        letter-spacing: 2px;
        padding: 20px 15px;
    }
    
    .result-message {
        font-size: 20px;
    }
    
    #result-container,
    #rswpc-form-container {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .physical-prize-notice {
        padding: 20px;
    }
    
    .physical-prize-notice p:first-child {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    #wheel-canvas {
        max-width: 320px;
    }
    
    .wheel-wrapper {
        padding: 10px;
    }
    
    .complete-button {
        padding: 14px 30px;
        font-size: 16px;
    }
    
    #rswpc-form-container h2 {
        font-size: 22px;
    }
    
    .card-code {
        font-size: 20px;
        letter-spacing: 1px;
    }
}

/* Debug Panel Styling */
.debug-panel button {
    background: #333;
    color: white;
    border: none;
    padding: 5px 8px;
    font-size: 11px;
    border-radius: 3px;
    cursor: pointer;
    margin: 2px;
}

.debug-panel button:hover {
    background: #d32f2f;
}