/* ============================================
   assets/style.css - Lucky Wheel Plugin
   ============================================ */

:root {
    --primary: #081E41;
    --secondary: #40538B;
    --gray: #636363;
    --accent: #9E4B47;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.lucky-wheel-container {
    direction: rtl;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.lucky-wheel-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.wheel-canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 500px;
    margin: 0 auto;
}

.wheel-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    transition: transform 4s cubic-bezier(0.33, 0.66, 0.66, 1);
}

.wheel-pointer {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid var(--accent);
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.wheel-content {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
}

.spin-button {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent) 0%, #d64646 100%);
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(158, 75, 71, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    text-align: center;
}

.spin-button:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(158, 75, 71, 0.6);
}

.spin-button:active:not(:disabled) {
    transform: scale(0.95);
}

.spin-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.spin-button span {
    display: block;
}

/* Modals */
.form-modal,
.result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 30, 65, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.form-content,
.result-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.form-content h2,
.result-content h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 30px;
    font-size: 28px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(64, 83, 139, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--accent);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(64, 83, 139, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.result-content p {
    text-align: center;
    color: var(--gray);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.close-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(158, 75, 71, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .lucky-wheel-container {
        padding: 10px;
    }

    .wheel-canvas {
        max-width: 400px;
    }

    .spin-button {
        width: 120px;
        height: 120px;
        font-size: 14px;
    }

    .form-content,
    .result-content {
        padding: 30px 20px;
        max-width: 90%;
    }

    .form-content h2,
    .result-content h2 {
        font-size: 22px;
    }

    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .spin-button {
        width: 100px;
        height: 100px;
        font-size: 12px;
    }

    .form-content,
    .result-content {
        padding: 20px;
    }

    .form-group input,
    .form-group select {
        padding: 8px 10px;
        font-size: 13px;
    }
}

/* Accessibility */
.spin-button:focus,
.submit-btn:focus,
.close-btn:focus {
    outline: 2px solid var(--secondary);
    outline-offset: 2px;
}

input::placeholder {
    color: #999;
}

select option {
    color: var(--primary);
    background: white;
}