/* ===== فونت Traffic ===== */
@font-face {
    font-family: 'Traffic';
    src: url('B Traffic.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ===== ریست کلی ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: 'Traffic', 'Tahoma', sans-serif;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    padding-top: 40px;
    position: relative;
    overflow-y: auto;
    background: linear-gradient(145deg, #d4dee8 0%, #c5d2de 40%, #b8c8d6 100%);
    background-attachment: fixed; 
    background-size: cover;   
}

/* ===== اشکال تزئینی پس‌زمینه ===== */
.shape {
    position: fixed;
    border-radius: 50%;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.shape-triangle {
    width: 300px;
    height: 300px;
    top: -10px;
    left: -10px;
    background: #2c6b8a;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: float 20s ease-in-out infinite;
}

.shape-circle {
    width: 400px;
    height: 400px;
    bottom: -10px;
    right: -10px;
    background: #27ae60;
    border-radius: 50%;
    animation: float 25s ease-in-out infinite reverse;
}

.shape-square {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2c6b8a;
    border-radius: 30% 70% 70% 30% / 70% 30% 70% 30%;
    animation: float 30s ease-in-out infinite;
}

.shape-triangle-2 {
    width: 250px;
    height: 250px;
    bottom: 10px;
    left: -8px;
    background: #e67e22;
    border-radius: 40% 60% 60% 40% / 40% 40% 60% 60%;
    animation: float 18s ease-in-out infinite 2s;
}

.shape-circle-2 {
    width: 180px;
    height: 180px;
    top: 8px;
    right: -6px;
    background: #8e44ad;
    border-radius: 50%;
    animation: float 22s ease-in-out infinite 4s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(30px, -30px) scale(1.1) rotate(5deg);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9) rotate(-5deg);
    }
    75% {
        transform: translate(20px, -10px) scale(1.05) rotate(3deg);
    }
}

/* ===== کانتینر اصلی ===== */
.container {
    max-width: 480px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* ===== باکس گلس‌مورفیسم ===== */
.box {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 40px 32px;
    box-shadow: 0 8px 32px rgba(0, 20, 40, 0.1);
    transition: all 0.3s ease;
}

.box:hover {
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 40px rgba(0, 20, 40, 0.12);
}

/* ===== عنوان ===== */
.box h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1a2a3a;
    text-align: center;
    margin-bottom: 6px;
}

.box h1 i {
    color: #2c6b8a;
    margin-left: 10px;
}

.subtitle {
    text-align: center;
    color: #5a6a7a;
    font-size: 15px;
    margin-bottom: 28px;
    opacity: 0.7;
}

/* ===== پیام‌ها ===== */
.message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 15px;
    text-align: center;
    line-height: 1.8;
}

.message.error {
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

.message.success {
    background: rgba(39, 174, 96, 0.08);
    border: 1px solid rgba(39, 174, 96, 0.15);
    color: #27ae60;
}

/* ===== فرم ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a2a3a;
    margin-bottom: 6px;
}

.form-group label i {
    color: #2c6b8a;
    margin-left: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: 'Traffic', 'Tahoma', sans-serif;
    background: rgba(255, 255, 255, 0.6);
    border: 1.5px solid rgba(44, 107, 138, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
    color: #1a2a3a;
    direction: rtl;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #2c6b8a;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(44, 107, 138, 0.04);
}

.form-group input::placeholder {
    color: #8a9aaa;
    opacity: 0.6;
}

/* ===== دکمه‌ها ===== */
.btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 17px;
    font-weight: 700;
    font-family: 'Traffic', 'Tahoma', sans-serif;
    background: linear-gradient(135deg, #2c6b8a, #1a4a6a);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 24px rgba(44, 107, 138, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary i {
    font-size: 18px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(44, 107, 138, 0.25);
    background: linear-gradient(135deg, #3a7a9a, #1a4a6a);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    display: inline-block;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Traffic', 'Tahoma', sans-serif;
    background: rgba(44, 107, 138, 0.04);
    color: #1a2a3a;
    border: 1.5px solid rgba(44, 107, 138, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-secondary:hover {
    background: rgba(44, 107, 138, 0.08);
    border-color: rgba(44, 107, 138, 0.15);
    transform: translateY(-2px);
}

.btn-secondary i {
    margin-left: 8px;
}

/* ===== لینک‌های پایین ===== */
.login-link {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(44, 107, 138, 0.06);
}

.login-link p {
    color: #5a6a7a;
    font-size: 15px;
    margin-bottom: 10px;
}

/* ===== فرم دوستونه (ثبت‌نام) ===== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ===== پیام‌های اعتبارسنجی ===== */
.field-error {
    font-size: 13px;
    color: #e74c3c;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== رسپانسیو موبایل ===== */
@media (max-width: 600px) {
    body {
        padding: 12px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .box {
        padding: 28px 18px;
        border-radius: 18px;
    }

    .box h1 {
        font-size: 22px;
    }

    .subtitle {
        font-size: 14px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .btn-primary {
        font-size: 16px;
        padding: 12px;
    }

    .btn-secondary {
        font-size: 14px;
        padding: 8px 20px;
        width: 100%;
    }

    .form-group input,
    .form-group select {
        padding: 10px 14px;
        font-size: 14px;
    }

    .shape-triangle,
    .shape-square,
    .shape-triangle-2 {
        display: none;
    }

    .shape-circle {
        width: 200px;
        height: 200px;
        bottom: -80px;
        right: -80px;
    }

    .shape-circle-2 {
        width: 120px;
        height: 120px;
        top: -40px;
        right: -40px;
    }
}

@media (max-width: 400px) {
    .box {
        padding: 20px 14px;
    }

    .box h1 {
        font-size: 19px;
    }

    .btn-primary {
        font-size: 15px;
        padding: 10px;
    }
}