/**
 * Tada Ruota Wheel Styles
 */

.tada-ruota-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
    position: relative;
}

/* Sandbox Banner */
.tada-ruota-sandbox-banner {
    background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
    color: #fff;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 5px;
    margin-bottom: 15px;
    animation: tada-ruota-pulse 2s infinite;
}

@keyframes tada-ruota-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Email Form */
.tada-ruota-form {
    padding: 30px;
}

.tada-ruota-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1e1e1e;
}

.tada-ruota-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0 0 25px;
}

.tada-ruota-email-wrapper {
    margin-bottom: 20px;
}

.tada-ruota-email-input {
    width: 100%;
    max-width: 300px;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 30px;
    outline: none;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.tada-ruota-email-input:focus {
    border-color: #667eea;
}

.tada-ruota-email-input.error {
    border-color: #e74c3c;
}

.tada-ruota-email-error {
    display: block;
    color: #e74c3c;
    font-size: 14px;
    margin-top: 8px;
    min-height: 20px;
}

/* Buttons */
.tada-ruota-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tada-ruota-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.tada-ruota-button:active {
    transform: translateY(0);
}

.tada-ruota-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Wheel Container */
.tada-ruota-wheel-wrapper {
    padding: 20px 0;
}

.tada-ruota-wheel-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 30px;
}

#tada-ruota-canvas {
    width: 100%;
    height: auto;
    display: block;
}

/* Pointer */
.tada-ruota-pointer {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Center */
.tada-ruota-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 5;
}

.tada-ruota-center span {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
}

.tada-ruota-center img {
    max-width: 60px;
    max-height: 60px;
    border-radius: 50%;
}

/* Spin Button */
.tada-ruota-spin-button {
    margin-top: 20px;
}

/* Locked Messages */
.tada-ruota-locked {
    padding: 40px 20px;
}

.tada-ruota-locked-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.tada-ruota-locked h3 {
    font-size: 24px;
    margin: 0 0 15px;
    color: #1e1e1e;
}

.tada-ruota-locked p {
    color: #666;
    margin: 0 0 20px;
}

.tada-ruota-locked-message {
    font-size: 18px;
    font-weight: 600;
    color: #27ae60;
}

/* Countdown */
.tada-ruota-countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.tada-ruota-countdown-item {
    text-align: center;
}

.tada-ruota-countdown-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 10px 15px;
    min-width: 60px;
}

.tada-ruota-countdown-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-transform: uppercase;
}

/* Result Modal */
.tada-ruota-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.tada-ruota-modal-content {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: tadaRuotaModalIn 0.3s ease;
}

@keyframes tadaRuotaModalIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tada-ruota-result-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.tada-ruota-result-title {
    font-size: 28px;
    margin: 0 0 15px;
    color: #1e1e1e;
}

.tada-ruota-result-message {
    font-size: 16px;
    color: #666;
    margin: 0 0 25px;
    line-height: 1.5;
}

.tada-ruota-result-icon.winner {
    animation: tadaRuotaCelebrate 0.5s ease;
}

@keyframes tadaRuotaCelebrate {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2) rotate(-5deg); }
    50% { transform: scale(1.2) rotate(5deg); }
    75% { transform: scale(1.2) rotate(-5deg); }
}

/* Loading */
.tada-ruota-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.tada-ruota-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: tadaRuotaSpin 1s linear infinite;
}

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

/* Inactive Messages */
.tada-ruota-inactive,
.tada-ruota-error {
    padding: 30px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 500px) {
    .tada-ruota-container {
        padding: 15px;
    }

    .tada-ruota-title {
        font-size: 24px;
    }

    .tada-ruota-countdown {
        gap: 10px;
    }

    .tada-ruota-countdown-value {
        font-size: 28px;
        padding: 8px 12px;
        min-width: 50px;
    }

    .tada-ruota-modal-content {
        padding: 30px 20px;
    }

    .tada-ruota-result-icon {
        font-size: 60px;
    }

    .tada-ruota-result-title {
        font-size: 24px;
    }
}
