
body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height));
}

.login-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}


.login-container {
    position: relative;
    border-radius: 28px;
    padding: 48px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    z-index: 1;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.login-container:hover {
    border-color: rgba(var(--bg-light-rgb), 0.15);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-header h2 {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-muted);
    font-size: 1em;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-group label {
    font-size: 0.9em;
    font-weight: 600;
    color: var(--text-muted);
}

.forgot-password {
    font-size: 0.85em;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.forgot-password:hover {
    color: var(--primary-hover);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    pointer-events: none;
    font-size: 1.25em;
}

.input-wrapper input {
    width: 100%;
    background: rgba(var(--bg-dark-rgb), 0.6);
    border: 1px solid rgba(var(--bg-light-rgb), 0.1);
    border-radius: 14px;
    padding: 14px 16px 14px 48px;
    color: var(--text-light);
    font-size: 1em;
    outline: none;
    transition: all 0.2s ease;
}

.input-wrapper input::placeholder {
    color: rgba(var(--bg-light-rgb), 0.25);
}

.input-wrapper input:focus {
    border-color: var(--primary);
    background: rgba(var(--bg-dark-rgb), 0.8);
}

.submit-btn {
    padding: 14px 28px;
    font-size: 1.05em;
    border-radius: 14px;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
}

.submit-btn:active {
    transform: translateY(1px);
}


.signup-prompt {
    text-align: center;
    margin-top: 32px;
    font-size: 0.95em;
    color: var(--text-muted);
}

.signup-prompt a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.signup-prompt a:hover {
    color: var(--primary-hover);
}

.error-message {
    position: absolute;
    bottom: calc(100% + 16px);
    left: 0;
    right: 0;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    border-radius: 14px;
    padding: 14px 20px;
    font-size: 0.95em;
    font-weight: 500;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2;
}

.login-container {
    opacity: 0;
    animation: loginAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes loginAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    position: relative;
    border-radius: 28px;
    padding: 40px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    z-index: 2001;
    animation: modalAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 1.8em;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--text-light);
}

.modal-content h3 {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 8px;
}

.modal-content p {
    color: var(--text-muted);
    font-size: 0.95em;
    margin-bottom: 24px;
}

.message {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 0.95em;
    margin-bottom: 16px;
    text-align: center;
}
.message.success {
    background: rgba(67, 160, 71, 0.15);
    border: 1px solid rgba(67, 160, 71, 0.3);
    color: #43a047;
}
.message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}


@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.submit-btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
    pointer-events: none;
}

.submit-btn.loading .material-symbols-rounded {
    animation: spin 1s linear infinite;
}