/* Ruleta ONE GYM - Estilos públicos */

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

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--color-light-gray, #F0F0F0);
    color: var(--color-black, #000);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    background: var(--color-black, #000);
    color: var(--color-white, #fff);
    padding: 0.5rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.site-logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

.site-logo-placeholder {
    font-size: 0.9rem;
    font-weight: 900;
    color: var(--color-primary, #FF3388);
    letter-spacing: 1px;
}

.header-text {
    font-size: 0.85rem;
    opacity: 0.9;
    flex: 1;
}

/* Main */
.main-content {
    flex: 1;
    padding: 2rem 1.5rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.ruleta-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.25rem, 2.5vw, 2.5rem);
    align-items: center;
    min-height: calc(100vh - 220px);
}

.ruleta-col-wheel {
    width: 100%;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ruleta-col-info {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 1.25rem;
}

.ruleta-title {
    font-size: clamp(1.4rem, 2.8vw, 2.45rem);
    font-weight: 900;
    text-align: left;
    color: var(--color-primary, #FF3388);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.15;
    text-shadow: 2px 2px 0 var(--color-dark-gray, #333);
}

.ruleta-info {
    text-align: left;
    font-size: 1.2rem;
    color: var(--color-dark-gray, #333);
    line-height: 1.7;
}

/* Formulario participante */
.participante-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.participante-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.participante-form label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--color-dark-gray, #333);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.participante-form input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid var(--color-dark-gray, #333);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--color-white, #fff);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.participante-form input:focus {
    outline: none;
    border-color: var(--color-primary, #FF3388);
    box-shadow: 0 0 0 3px rgba(255, 51, 136, 0.2);
}

.participante-form input:read-only {
    background: var(--color-light-gray, #f0f0f0);
    opacity: 0.85;
}

.form-error {
    color: #c0392b;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    background: #fdecea;
    border-radius: 8px;
    border-left: 4px solid #c0392b;
}

.form-error.hidden,
.hidden {
    display: none !important;
}

.modal-code {
    font-size: 1rem;
    color: var(--color-dark-gray, #333);
    margin: 0.5rem 0 1rem;
}

.modal-code strong {
    color: var(--color-primary, #FF3388);
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.modal-email-msg {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: #fdecea;
    color: #c0392b;
}

.modal-email-msg.success {
    background: #d4edda;
    color: #155724;
}

.btn-email {
    margin-bottom: 0.5rem;
    width: 100%;
}

.modal-content .btn-girar {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border-radius: 40px;
    box-shadow: 0 4px 14px rgba(255, 51, 136, 0.4);
}

.modal-content .btn-girar:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 18px rgba(255, 51, 136, 0.5);
}

.modal-content .btn-secondary {
    width: 100%;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Wheel */
.wheel-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1;
    margin-top: clamp(24px, 4vw, 40px);
    overflow: visible;
}

#ruletaCanvas {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow:
        0 0 0 clamp(5px, 1vw, 8px) var(--color-primary, #FF3388),
        0 0 0 clamp(8px, 1.4vw, 12px) var(--color-black, #000),
        0 10px 40px rgba(0,0,0,0.4);
    transition: transform 0.1s;
}

.wheel-pointer {
    position: absolute;
    top: clamp(-52px, -9vw, -68px);
    left: 50%;
    transform: translateX(-50%);
    width: clamp(30px, 6vw, 48px);
    height: clamp(68px, 11vw, 92px);
    z-index: 10;
    pointer-events: none;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.35));
}

.wheel-pointer svg {
    width: 100%;
    height: 100%;
    display: block;
    overflow: visible;
}

.wheel-pointer.ticking {
    animation: pointerTick 0.09s ease-out;
}

@keyframes pointerTick {
    0% { transform: translateX(-50%) rotate(0deg); }
    35% { transform: translateX(-50%) rotate(10deg); }
    100% { transform: translateX(-50%) rotate(0deg); }
}

.wheel-pointer .pointer-shape {
    fill: #000000;
    stroke: #FF3399;
    stroke-width: 3;
    stroke-linejoin: round;
}

.wheel-pointer .pointer-cap {
    fill: #000000;
    stroke: #FF3399;
    stroke-width: 3;
}

/* Button */
.btn-girar {
    background: var(--color-primary, #FF3388);
    color: var(--color-white, #fff);
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 60px;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(255, 51, 136, 0.5);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.btn-girar:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 35px rgba(255, 51, 136, 0.6);
}

.btn-girar:active:not(:disabled) {
    transform: translateY(0);
}

.btn-girar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--color-dark-gray, #333);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    margin-top: 1rem;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--color-white, #fff);
    border-radius: 24px;
    padding: 2.5rem;
    text-align: center;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    border: 4px solid var(--color-primary, #FF3388);
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-confetti {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.modal-content h2 {
    font-size: 2rem;
    color: var(--color-primary, #FF3388);
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    font-size: 1.1rem;
    color: var(--color-dark-gray, #333);
}

.modal-discount {
    font-size: 5rem;
    font-weight: 900;
    color: var(--color-primary, #FF3388);
    line-height: 1;
    margin: 1rem 0;
    text-shadow: 3px 3px 0 var(--color-black, #000);
}

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

@keyframes popIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Footer */
.site-footer {
    background: var(--color-black, #000);
    color: var(--color-white, #fff);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
}

.site-footer p {
    opacity: 0.85;
    margin-bottom: 0.5rem;
}

.admin-link {
    color: var(--color-primary, #FF3388);
    text-decoration: none;
    font-size: 0.8rem;
    opacity: 0.6;
}

.admin-link:hover {
    opacity: 1;
}

@media (max-width: 900px) {
    .main-content {
        padding: 1.5rem 1rem 2.5rem;
    }

    .ruleta-layout {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        min-height: auto;
    }

    .ruleta-col-wheel {
        order: -1;
    }

    .ruleta-col-info {
        align-items: center;
        text-align: center;
    }

    .ruleta-title {
        text-align: center;
    }

    .ruleta-info {
        text-align: center;
    }

    .wheel-container {
        width: min(100%, 560px);
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1.25rem 0.75rem 2rem;
    }

    .wheel-container {
        width: 100%;
    }

    .ruleta-title {
        font-size: 1.26rem;
    }

    .btn-girar {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        width: 100%;
    }

    .modal-discount {
        font-size: 3.5rem;
    }
}
