* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter';
}

body {
    background-color: #0f172a;
    color: #f1f5f9;
    min-height: 100vh;
    transition: all 0.3s ease;
}

body.light {
    background: linear-gradient(200deg, #858ea0, #4b5360);
    color: #0f172a;
}

/* ========== هدر ========== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: #1e293b;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: nowrap; /* مهم: اجازه نده آیتم‌ها به خط بعد برن */
    gap: 1rem;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
body.light header {
    background: linear-gradient(135deg, #475569, #7f8a99);
}

.logo {
    font-family: "Inter";
    font-size: 1.7rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.light .logo {
    font-family: "Inter";
    font-size: 1.7rem;
    font-weight: 800;
    background: linear-gradient(135deg, #94a3b8, #e2e8f0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ========== دکمه همبرگر ========== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 1.8rem;
    cursor: pointer;
}

body.light .menu-toggle {
    color: #1e293b;
}

/* ========== منوی موبایل ========== */
.menu {
    position: fixed;
    top: 70px;
    right: -250px;
    background: #1e293b;
    backdrop-filter: blur(10px);
    flex-direction: column;
    width: 220px;
    padding: 1rem 0;
    border-radius: 16px 0 0 16px;
    box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.3s ease;
    list-style: none;
}

body.light .menu {
    background: #94a3b8;
}

.menu.active {
    right: 0;
}

.menu li {
    width: 100%;
}

.menu a {
    display: block;
    padding: 12px 24px;
    color: #cbd5e1;
    text-decoration: none;
    transition: 0.2s;
    font-weight: 500;
}

body.light .menu a {
    color: #0f172a;
}

.menu a:hover {
    background: #3b82f6;
    color: white;
    padding-left: 32px;
}

/* ========== دکمه تم ========== */
.theme-btn {
    background: #334155;
    border: none;
    font-size: 1.3rem;
    padding: 0.5rem 1rem;
    border-radius: 40px;
    cursor: pointer;
    transition: 0.4s;
}

.theme-btn:hover {
    background-color: #2563eb;
    transform: translateY(-3px);
}

body.light .theme-btn {
    background-color: #cbd5e1;
    color: #1e293b;
}

body.light .theme-btn:hover {
    background-color: #475569;
    color: white;
}

/* ========== کانتینر ثبت‌نام ========== */
.register-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 300px);
    padding: 3rem 2rem;
}

.register-box {
    background: #1e293b;
    padding: 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    border: 1px solid #334155;
    transition: 0.3s;
}

body.light .register-box {
    background: linear-gradient(135deg, #94a3b8, #e2e8f0);
    border-color: #4d5259;
}

.register-header {
    text-align: center;
    margin-bottom: 2rem;
}

.register-header i {
    font-size: 4rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}

body.light .register-header i {
    color: #1e293b;
}

.register-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.register-header p {
    color: #94a3b8;
}

body.light .register-header p {
    color: #0f172a;
}

/* ========== پیام موفقیت/خطا ========== */
.top-message {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid transparent;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.35s ease;
}

.top-message.success {
    background: linear-gradient(135deg, #e9f9ef, #dff7e8);
    color: #146c43;
    border-color: #b7e4c7;
}

.top-message.error {
    background: linear-gradient(135deg, #fdecec, #fbe2e2);
    color: #b42318;
    border-color: #f5b5b5;
}

.top-message i {
    font-size: 18px;
    flex-shrink: 0;
}

.top-message span {
    line-height: 1.6;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== فرم ========== */
.input-group {
    display: flex;
    align-items: center;
    background: #0f172a;
    border-radius: 12px;
    padding: 0.8rem 1rem;
    margin-bottom: 1.2rem;
    border: 1px solid #334155;
    transition: 0.3s;
}

body.light .input-group {
    background: #ffffff;
    border-color: #cbd5e1;
}

.input-group:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.input-group i {
    color: #3b82f6;
    font-size: 1.2rem;
    margin-right: 0.8rem;
}

body.light .input-group i {
    color: #1e293b;
}

.input-group input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #f1f5f9;
    font-size: 1rem;
}

body.light .input-group input {
    color: #0f172a;
}

.input-group input::placeholder {
    color: #94a3b8;
}

/* ========== گروه پسورد با چشم ========== */
.password-group {
    position: relative;
}

.toggle-password {
    cursor: pointer;
    margin-left: 10px;
    font-size: 1.2rem;
    color: #94a3b8;
    transition: 0.3s;
}

.toggle-password:hover {
    color: #3b82f6;
}

body.light .toggle-password {
    color: #475569;
}

body.light .toggle-password:hover {
    color: #1e293b;
}

/* ========== چک‌باکس شرایط ========== */
.form-options {
    margin-bottom: 1.5rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: #94a3b8;
    flex-wrap: wrap;
}

body.light .checkbox {
    color: #0f172a;
}

.checkbox input {
    cursor: pointer;
}

.checkbox a {
    color: #3b82f6;
    text-decoration: none;
}

.checkbox a:hover {
    text-decoration: underline;
}

/* ========== دکمه ثبت‌نام ========== */
.register-btn {
    width: 100%;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.register-btn:hover {
    background: #2563eb;
    transform: translateY(-3px);
}

body.light .register-btn {
    background: linear-gradient(135deg, #aac3e3, #636b74);
    color: #1e293b;
}

body.light .register-btn:hover {
    background: linear-gradient(135deg, #636b74, #475569);
    color: white;
}

/* ========== لینک به لاگین ========== */
.login-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #334155;
}

body.light .login-link {
    border-top-color: #cbd5e1;
}

.login-link p {
    color: #94a3b8;
}

body.light .login-link p {
    color: #0f172a;
}

.login-link a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

/* ========== فوتر ========== */
footer {
    text-align: center;
    padding: 2rem;
    background-color: #1e293b;
    margin-top: 2rem;
}

body.light footer {
    background-color: #8898ad;
}

.special-thanks {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 1rem;
    border-top: 1px solid #334155;
    border-bottom: 1px solid #334155;
    background: rgba(59, 130, 246, 0.05);
}

body.light .special-thanks {
    color: #0f172a;
    border-color: #cbd5e1;
}

.special-thanks i {
    color: #ef4444;
    margin: 0 8px;
    animation: heartBeat 1.5s ease infinite;
}

.special-thanks p {
    display: inline-block;
    font-size: 0.95rem;
    font-style: italic;
    color: #cbd5e1;
}

body.light .special-thanks p {
    color: #151515;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* ========== دکمه برگشت ========== */
.Home {
    cursor: pointer;
    border: none;
    font-size: 18px;
    bottom: 30px;
    left: 30px;
    padding: 12px 28px;
    background-color: #3b82f6;
    color: #f8fafc;
    position: fixed;
    transition: 0.3s ease;
    border-radius: 40px;
    font-weight: bold;
    z-index: 100;
}

.Home:hover {
    background-color: #2563eb;
    transform: translateY(-3px);
}

body.light .Home {
    background-color: #94a3b8;
    color: #0f172a;
}

body.light .Home:hover {
    background-color: #475569;
    color: #cbd5e1;
}
/* ========== انیمیشن ========== */
.animate-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
/* ========== موبایل ========== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .register-box {
        padding: 1.8rem;
    }
    
    .register-header h2 {
        font-size: 1.5rem;
    }
    
    .checkbox {
        font-size: 0.75rem;
    }
}
/* ========== پیام موفقیت/خطا ========== */
.top-message {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid transparent;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.35s ease;
}

.top-message.success {
    background: linear-gradient(135deg, #e9f9ef, #dff7e8);
    color: #146c43;
    border-color: #b7e4c7;
}

.top-message.error {
    background: linear-gradient(135deg, #fdecec, #fbe2e2);
    color: #b42318;
    border-color: #f5b5b5;
}

.top-message i {
    font-size: 18px;
    flex-shrink: 0;
}

.top-message span {
    line-height: 1.6;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}