﻿
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Vazir',sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    overflow: hidden;
    position: relative;
}

/* ===== حباب‌های پس‌زمینه ===== */
.background-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.bubble {
    position: absolute;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    backdrop-filter: blur(10px);
    animation: float 8s ease-in-out infinite;
}

    .bubble:nth-child(1) {
        top: 10%;
        left: 10%;
        width: 100px;
        height: 100px;
        animation-delay: 0s;
    }

    .bubble:nth-child(2) {
        top: 70%;
        left: 20%;
        width: 150px;
        height: 150px;
        animation-delay: 2s;
    }

    .bubble:nth-child(3) {
        top: 30%;
        left: 70%;
        width: 80px;
        height: 80px;
        animation-delay: 4s;
    }

    .bubble:nth-child(4) {
        top: 50%;
        left: 80%;
        width: 120px;
        height: 120px;
        animation-delay: 6s;
    }

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-50px) rotate(180deg);
    }

    100% {
        transform: translateY(0) rotate(360deg);
    }
}

/* ===== لودر ===== */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity .5s ease-out;
}

.loader {
    border: 8px solid rgba(255,193,7,0.2);
    border-top: 8px solid #dc3545;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

    .loader.gold-border {
        border-left: 8px solid #ffc107;
        border-bottom: 8px solid #dc3545;
        border-right: 8px solid #ffc107;
        animation: spin-reverse 1s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    to {
        transform: rotate(-360deg);
    }
}

.content-loaded .loader-wrapper {
    opacity: 0;
    pointer-events: none;
}

/* ===== فرم لاگین ===== */
.login-container {
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,193,7,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border-radius: 15px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    animation: fadeIn 0.8s ease-out both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container .logo {
    margin-bottom: 30px;
}

    .login-container .logo i {
        color: #ffc107;
        font-size: 4rem;
    }

.login-container h2 {
    margin-bottom: 30px;
    color: #ffc107;
    font-size: 2em;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

/* ===== گروه ورودی ===== */
.input-group {
    position: relative;
    margin-bottom: 25px;
}

    .input-group input {
        width: 100%;
        padding: 15px 45px 15px 15px;
        background: rgba(255,255,255,0.08);
        border: 1px solid rgba(255,193,7,0.3);
        border-radius: 8px;
        color: #fff;
        font-size: 1.1em;
        outline: none;
        transition: all .3s ease;
    }

        .input-group input:focus {
            border-color: #dc3545;
            box-shadow: 0 0 0 3px rgba(220,53,69,0.4);
            background: rgba(255,255,255,0.15);
        }

    .input-group .icon {
        display: block;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        right: 15px;
        font-size: 1.2em;
        color: #ffc107;
        pointer-events: none;
    }

/* دکمه ورود */
.login-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg,#dc3545 0%,#ff4533 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(220,53,69,0.4);
    transition: all .3s ease;
    margin-top: 10px;
}

    .login-button:hover {
        background: linear-gradient(90deg,#ff4533 0%,#dc3545 100%);
        box-shadow: 0 6px 20px rgba(255,193,7,0.5);
        transform: translateY(-2px);
    }

/* طراحی و پیاده‌سازی */
.credits {
    margin-top: 20px;
    font-size: 0.85em;
    color: rgba(255,193,7,0.8);
}

/* ===== پاسخگوئی ===== */
@media (max-width:600px) {
    .login-container {
        padding: 30px;
    }

        .login-container h2 {
            font-size: 1.8em;
        }

    /* فقط vert padding و font-size، padding افقی را برای آیکون‌ها حفظ می‌کنیم */
    .input-group input {
        font-size: 1em;
        padding: 12px 44px 12px 12px; /* بالا-راست-پایین-چپ */
    }

    .input-group .icon {
        font-size: 1.1em;
        right: 12px;
    }

    .login-button {
        font-size: 1em;
        padding: 12px;
    }
}

@media (max-width:400px) {
    .background-bubbles {
        display: none;
    }
}
