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

:root {
    --primary-color: #102649;
    --secondary-color: #007DB6;
    --accent-color: #F7C100;
    --background-dark: #102649;
    --text-light: #f8fafc;
    --text-muted: #cbd5e1;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
    --font-en: 'Outfit', sans-serif;
    --font-ar: 'Cairo', sans-serif;
}

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

body {
    font-family: var(--font-en);
    background-color: var(--background-dark);
    /* Animated mesh gradient background - 2 Colors */
    background-image:
        radial-gradient(at 0% 0%, #102649 0, transparent 50%),
        radial-gradient(at 100% 100%, #007DB6 0, transparent 50%);
    background-size: 200% 200%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.container {
    text-align: center;
    padding: 4rem 2rem;
    max-width: 900px;
    width: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;

    /* Refined Glassmorphism */
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 40px;
    box-shadow:
        0 8px 32px 0 rgba(0, 0, 0, 0.37),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

header h1 {
    font-size: 4rem;
    font-weight: 800;
    color: #F7C100;
    /* Solid Dark Blue */
    margin-bottom: 0.5rem;
    letter-spacing: -2px;
    line-height: 1.1;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.25rem;
    font-weight: 300;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.wheel-container {
    position: relative;
    width: 450px;
    height: 450px;
    margin: 0 auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
    cursor: pointer;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wheel-container:hover {
    transform: scale(1.05) rotate(2deg);
}

canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.arrow {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-top: 45px solid var(--accent-color);
    z-index: 10;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.spin-btn {
    display: none;
}

.instruction-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.2rem 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s ease, background 0.3s ease;
}

.instruction-container:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.instruction,
.instruction-ar {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

.instruction-ar {
    font-family: var(--font-ar);
    font-weight: 600;
}

footer {
    margin-top: 1rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
    width: 100%;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

footer .small {
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 38, 73, 0.85);
    backdrop-filter: blur(12px);
    z-index: 100;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(16, 38, 73, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3.5rem;
    border-radius: 40px;
    max-width: 700px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.close-btn {
    position: absolute;
    top: 25px;
    right: 30px;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}

.modal h2 {
    color: #F7C100;
    margin-bottom: 2.5rem;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.quote-container {
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.quote-ar {
    font-family: var(--font-ar);
    font-size: 2rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    color: white;
    direction: rtl;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.quote-en {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.6;
    font-weight: 300;
}

.primary-btn {
    background: #007DB6;
    /* Requested Color */
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    /* Pill shape */
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 125, 182, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 125, 182, 0.6);
    background: #008ecf;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 2rem 1rem;
        width: 100%;
        border: none;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .wheel-container {
        width: 320px;
        height: 320px;
    }

    header h1 {
        font-size: 2.5rem;
    }

    .quote-ar {
        font-size: 1.4rem;
    }

    .modal-content {
        padding: 2rem;
        width: 95%;
    }
}