* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url("../img/background.png") no-repeat center center fixed;
    background-size: cover;
    opacity: 0;
    animation: pageLoad 0.8s ease forwards;
}

@keyframes pageLoad {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== THEME BTN ===== */
.theme-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    background: rgba(255,255,255,0.8);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    padding: 5px;
    z-index: 100;
}

.theme-btn svg {
    width: 18px;
    height: 18px;
}

.theme-btn:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* ===== AUTH BOX ===== */
.auth-box {
    width: 360px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    padding: 35px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    animation: fadeUp 0.8s ease;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.back-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    text-decoration: none;
    font-size: 18px;
    color: #111;
    transition: 0.3s;
    display: block;
    margin: 0;
}

.back-btn:hover {
    transform: scale(1.2);
    color: #111;
}

.auth-box img {
    height: 50px;
    margin-bottom: 15px;
}

.auth-box h2 {
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 20px;
}

/* ===== INPUTS ===== */
.input-group {
    margin-bottom: 5px;
    text-align: right;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    outline: none;
    transition: 0.3s;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
}

.input-group input:focus {
    border-color: #111;
}

.input-error {
    font-size: 11px;
    color: #dc2626;
    display: block;
    margin: 3px 5px 5px;
    min-height: 16px;
}

.password-wrap {
    position: relative;
}

.toggle-pass {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    width: auto;
    padding: 0;
    margin: 0;
    color: #777;
}

.toggle-pass:hover {
    background: none;
    transform: translateY(-50%);
}

/* ===== BUTTON ===== */
.submit-btn {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    border: none;
    background: #111;
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 600;
}

.submit-btn:hover {
    background: #000;
    transform: scale(1.03);
}

/* ===== LINKS ===== */
.auth-box a:not(.back-btn) {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: #555;
    text-decoration: none;
    transition: 0.3s;
}

.auth-box a:not(.back-btn):hover {
    color: #111;
}

/* ===== ALERT ===== */
.alert {
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 13px;
    font-weight: 600;
}

.alert.error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert.success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* ===== DARK MODE ===== */
body.dark {
    background-image: url("../img/background 2.png");
}

body.dark .auth-box {
    background: rgba(20,20,20,0.9);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

body.dark .auth-box h2 {
    color: #f0f0f0;
}

body.dark .back-btn {
    color: #f0f0f0;
}

body.dark .input-group input {
    background: #1e1e1e;
    border-color: #333;
    color: #f0f0f0;
}

body.dark .input-group input:focus {
    border-color: #f0f0f0;
}

body.dark .input-group input::placeholder {
    color: #777;
}

body.dark .submit-btn {
    background: #f0f0f0;
    color: #111;
}

body.dark .submit-btn:hover {
    background: #fff;
}

body.dark .auth-box a:not(.back-btn) {
    color: #aaa;
}

body.dark .auth-box a:not(.back-btn):hover {
    color: #f0f0f0;
}

body.dark .theme-btn {
    background: rgba(20,20,20,0.8);
    border-color: #333;
    color: #f0f0f0;
}

body.dark .theme-btn:hover {
    background: #f0f0f0;
    color: #111;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 400px) {
    .auth-box {
        width: 90%;
        padding: 25px 20px;
    }
}