:root {
    --bg-color: #0c0f39;
    --text-color: #ffffff;
    --box-bg: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(255, 255, 255, 0.1);
    --accent-color: #032cfc;
    --placeholder-color: #ccc;
    --error-color: #ff4d4f;
}

[data-theme="light"] {
    --bg-color: #f3f3f3;
    --text-color: #000;
    --box-bg: #ffffff;
    --input-bg: #f0f0f0;
    --accent-color: #032cfc;
    --placeholder-color: #888;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Logo Section */
.logo-container {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: bounce 3s infinite ease-in-out;
}
.logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Login Box */
.login-box {
    background: var(--box-bg);
    backdrop-filter: blur(20px);
    padding: 40px 30px;
    border-radius: 20px;
    width: 350px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 1s ease;
}

/* Branding & Text */
.login-title {
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(to right, var(--accent-color), var(--text-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

.login-text {
    text-align: center;
    color: var(--placeholder-color);
    font-size: 14px;
    margin-bottom: 25px;
}

/* Input Fields */
.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: var(--accent-color);
}

.input-field {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border-radius: 20px;
    border: none;
    font-size: 16px;
    background: var(--input-bg);
    color: var(--text-color);
    outline: none;
}

.input-field::placeholder {
    color: var(--placeholder-color);
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--accent-color);
}

/* Remember Me */
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-color);
}

.remember-me input[type="checkbox"] {
    accent-color: var(--accent-color);
    margin-right: 8px;
    cursor: pointer;
}

/* Links */
.extra-links {
    text-align: right;
    margin-bottom: 20px;
}

.extra-links a {
    font-size: 13px;
    color: var(--accent-color);
    text-decoration: none;
}

.extra-links a:hover {
    text-decoration: underline;
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 12px;
    border-radius: 20px;
    background-color: var(--accent-color);
    color: white;
    font-weight: bold;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
    position: relative;
}

.submit-button:hover {
    background-color: #021cb5;
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 3px solid transparent;
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.submit-button.loading .btn-text {
    opacity: 0.6;
}

.submit-button.loading .spinner {
    display: inline-block;
}

/* Error Message */
.error-message {
    color: var(--error-color);
    text-align: center;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Theme Toggle */
.theme-toggle {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 20px;
    z-index: 100;
}

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .container {
        flex-direction: column;
        gap: 30px;
    }

    .logo-container {
        width: 180px;
        height: 180px;
    }

    .login-box {
        width: 100%;
        max-width: 90%;
    }
}
