@tailwind base;
@tailwind components;
@tailwind utilities;

@font-face {
    font-family: Vazirmatn;
    src: url('../font/Vazir.woff');
    font-weight: bold;
}

:root {
    --dark-bg: #0a0a0a;
    --darker-bg: #070707;
    --gold: #d4af37;
    --gold-light: #f4c460;
    --gold-dark: #b4943a;
    --text: #ffffff;
    --text-secondary: #94a3b8;
    --card-bg: #18181b;
    --border-color: #27272a;
}

html, body {
    height: 100%;
}

body    {
    font-family: 'Vazirmatn', sans-serif;
    color: var(--text);
    margin: 0;
    height: 100vh;
    overflow: hidden;
    background: linear-gradient(to bottom, #0b1026 0%, #0a2048 70%);
    position: relative;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 1s infinite;
}

.shooting-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: shoot 3s linear infinite;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

@keyframes shoot {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        transform: translateX(200%) translateY(200%) rotate(45deg);
        opacity: 0;
    }
}

.navbar {
    background-color: rgba(7, 7, 7, 0.95);
    backdrop-filter: blur(10px);
}

.navbar-brand img {
    height: 45px;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.nav-link {
    color: var(--text) !important;
    margin: 0 1rem;
    font-weight: 500;
    position: relative;
    transition: all 0.3s;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--gold);
    transition: width 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.navbar-nav {
    margin: 0 auto;
    text-align: center;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.login-btn {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border: none;
    padding: 0.7rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    color: var(--dark-bg) !important;
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(212, 175, 55, 0.3);
}

.profile-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
    color: var(--dark-bg);
}

.profile-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(212, 175, 55, 0.3);
}

/* Modal Styles */
.modal-backdrop {
    --bs-backdrop-opacity: 0.7;
    transition: opacity 0.2s ease-in-out;
    opacity: 0;
}

.modal-backdrop.show {
    opacity: var(--bs-backdrop-opacity);
}

.modal {
    --modal-duration: 0.3s;
    color: var(--text);
    transition: opacity var(--modal-duration) ease-in-out;
    opacity: 0;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: var(--dark-bg);
    transform: scale(0.9);
    opacity: 0;
    transition: all var(--modal-duration) ease-in-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1rem;
    border-top-left-radius: 11px;
    border-top-right-radius: 11px;
}

.modal-header.bg-success {
    background-color: rgba(40, 167, 69, 0.9);
    backdrop-filter: blur(8px);
}

.modal-header.bg-danger {
    background-color: rgba(220, 53, 69, 0.9);
    backdrop-filter: blur(8px);
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Form Controls */
.form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: var(--text);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #3699FF;
    border-color: #3699FF;
}

.btn-primary:hover {
    background-color: #187DE4;
    border-color: #187DE4;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: transparent;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: transparent;
}

/* Close Button */
.btn-close {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.btn-close:hover {
    opacity: 1;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Error Messages */
.text-danger {
    font-size: 0.875rem;
    opacity: 0;
    transform: translateY(-5px);
    animation: showError 0.3s ease forwards;
}

@keyframes showError {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0;
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.page-des {
    margin-bottom: 1rem;
    color: var(--gold-light);
    text-align: center;
}

.btn-spin {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    color: var(--dark-bg);
    border: none;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.btn-spin:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    box-shadow: 0 5px 25px rgba(212, 175, 55, 0.3);
}

.btn-spin:disabled {
    background: var(--text-secondary);
    opacity: 0.7;
    box-shadow: none;
}

.container-wheel {
    display: flex;
    flex-direction: row;
}

.sidebar {
    width: 25%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--card-bg);
    padding: 1rem;
    border-right: 1px solid var(--border-color);
}

.wheel-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    height: 88vh!important;
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 1s infinite;
}

.shooting-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: white;
    border-radius: 50%;
    animation: shoot 3s linear infinite;
}

@keyframes twinkle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

@keyframes shoot {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translateX(200%) translateY(200%) rotate(45deg);
        opacity: 0;
    }
}

.wheel-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-text {
    color: white;
    font-size: 18px;
    font-weight: bold;
}

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

.wheel-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading-text {
    color: white;
    font-size: 18px;
    font-weight: bold;
}

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

#wheel-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2!important;
}

/* برای اندازه‌های کوچک */
@media screen and (max-width: 768px) {
    .container-wheel {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 1rem 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .wheel-wrapper {
        width: 100%;
        height: 60vh!important;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .page-des {
        font-size: 1rem;
    }

    .btn-spin {
        font-size: 1rem;
    }
}

/* برای صفحات کوچکتر از 480px */
@media screen and (max-width: 480px) {
    .page-title {
        font-size: 1.5rem;
    }

    .page-des {
        font-size: 0.9rem;
    }

    .btn-spin {
        font-size: 0.9rem;
    }
}
