:root {
    --bg-color: #ffeaa7; /* bright yellow background */
    --primary: #ff4757; /* soft red/pink */
    --primary-dark: #ff1e36;
    --secondary: #1dd1a1; /* bright mint green */
    --secondary-dark: #10ac84;
    --accent: #feca57; /* cheerful yellow */
    --accent-dark: #ff9f43;
    --rose: #ff9ff3;
    --text: #2f3542;
    --white: #ffffff;
    --shadow: 4px 6px 0px #2f3542; /* solid dark shadow for cartoon effect */
    --border-dark: 4px solid #2f3542; /* thick outlines */
}

body {
    margin: 0;
    font-family: 'Baloo Bhaijaan 2', cursive, sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(rgba(255,255,255,0.4) 15%, transparent 16%), radial-gradient(rgba(255,255,255,0.4) 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* خلفية الفقاعات الإبداعية */
.bubbles {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    pointer-events: none;
}
.bubble {
    position: absolute;
    bottom: -100px;
    background: rgba(47, 53, 66, 0.1);
    border-radius: 50%;
    border: 2px solid rgba(47, 53, 66, 0.2);
    animation: float 8s infinite ease-in;
}
.bubble:nth-child(1) { width: 40px; height: 40px; left: 10%; animation-duration: 6s; }
.bubble:nth-child(2) { width: 80px; height: 80px; left: 30%; animation-duration: 9s; }
.bubble:nth-child(3) { width: 50px; height: 50px; left: 50%; animation-duration: 7s; }
.bubble:nth-child(4) { width: 100px; height: 100px; left: 70%; animation-duration: 12s; }
.bubble:nth-child(5) { width: 30px; height: 30px; left: 85%; animation-duration: 5s; }

@keyframes float {
    0% { transform: translateY(0) rotate(0deg); opacity: 0.9; }
    100% { transform: translateY(-1000px) rotate(360deg); opacity: 0; }
}

/* صندوق تسجيل الدخول */
.login-box {
    background: white;
    width: 90%;
    max-width: 450px;
    padding: 3rem 2rem;
    border-radius: 30px;
    box-shadow: var(--shadow);
    text-align: center;
    border: var(--border-dark);
    position: relative;
    z-index: 10;
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    80% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.login-header {
    color: var(--primary);
    text-shadow: 2px 2px 0px var(--white), 4px 4px 0px #2f3542;
    font-size: 2.8rem;
    margin-top: 0;
    margin-bottom: 10px;
}

.login-subtext {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--rose);
    margin-bottom: 30px;
    text-shadow: 1px 1px 0px #2f3542;
}

.login-input-container {
    position: relative;
    margin-bottom: 25px;
}

.login-input {
    width: 100%;
    box-sizing: border-box;
    padding: 15px 20px;
    border: var(--border-dark);
    border-radius: 20px;
    font-size: 1.8rem;
    font-family: inherit;
    text-align: center;
    color: var(--text);
    transition: 0.3s;
    background: var(--bg-color);
    box-shadow: inset 0px 4px 0px rgba(0,0,0,0.05);
}

.login-input:focus {
    border-color: var(--secondary);
    outline: none;
    transform: scale(1.05) rotate(1deg);
    background: white;
}

.action-btn {
    background: var(--accent);
    color: var(--text);
    border: var(--border-dark);
    padding: 15px 40px;
    border-radius: 30px;
    font-size: 1.6rem;
    font-weight: bold;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.1s;
    box-shadow: 4px 6px 0px #2f3542;
    width: 100%;
    margin-top: 10px;
}

.action-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 6px 8px 0px #2f3542;
    background: var(--secondary);
    color: white;
}

.action-btn:active {
    transform: translateY(6px);
    box-shadow: 0px 0px 0px #2f3542;
}

/* التنبيهات */
.alert-msg {
    margin-top: 20px;
    padding: 15px;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    display: none;
    border: 3px solid transparent;
    animation: shake 0.5s;
}

.alert-error {
    background: #ff7675;
    color: white;
    border-color: var(--primary-dark);
    display: block;
}

.alert-success {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary-dark);
    display: block;
}

@keyframes shake {
    0%,100%{ transform: translateX(0); }
    25%{ transform: translateX(-10px) rotate(-2deg); }
    75%{ transform: translateX(10px) rotate(2deg); }
}

.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 5px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    display: none;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
