@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Modern Login Page Styles */
:root {
    --primary-color: #1DA1F2;
    --primary-hover: #0C85D0;
    --text-dark: #0F1419;
    --text-muted: #536471;
    --bg-light: #F7F9FA;
    --border-color: #EFF3F4;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-dark);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    overflow: hidden;
    margin: 0;
    width: 100%;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* Container */
.login-container {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 48px 40px;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 10;
    margin: auto;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1DA1F2, #667eea, #764ba2);
    border-radius: 24px 24px 0 0;
}

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

/* Logo Section */
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 16px;
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.login-logo p {
    font-size: 15px;
    color: var(--text-muted);
}

/* Form Styles */
.login-form {
    margin-top: 32px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 16px 18px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-light);
    font-weight: 500;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(29, 161, 242, 0.15), 0 4px 12px rgba(29, 161, 242, 0.1);
    transform: translateY(-1px);
}

.form-control:hover:not(:focus) {
    border-color: #c1d5e0;
    background: white;
}

.form-control::placeholder {
    color: #A0A8B0;
}

/* Checkbox */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.form-check-input {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    margin-right: 8px;
    transition: all 0.2s ease;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-label {
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 18px;
    font-size: 16px;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #1DA1F2 0%, #0C85D0 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(29, 161, 242, 0.5);
    background: linear-gradient(135deg, #0C85D0 0%, #1DA1F2 100%);
}

.btn-submit:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.4);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(29, 161, 242, 0.2);
}

.btn-submit:disabled:hover::before {
    left: -100%;
}

/* Links */
.form-links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 32px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 16px;
}

/* Register Link */
.register-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Footer Links */
.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.login-footer a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    margin: 0 8px;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 0;
        align-items: flex-start;
    }

    .login-container {
        width: 100%;
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        padding: 32px 24px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .login-logo h1 {
        font-size: 24px;
    }

    .form-control {
        padding: 12px 14px;
    }

    .btn-submit {
        padding: 14px;
        font-size: 15px;
    }
}

/* Animation for form elements */
.form-group {
    animation: fadeIn 0.5s ease-out forwards;
    opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Loading state */
.loading .btn-submit {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.loading .btn-submit::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    top: 50%;
    left: 50%;
    margin-left: -12px;
    margin-top: -12px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

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

/* Success/Error States */
.form-control.error {
    border-color: #E0245E;
}

.form-control.success {
    border-color: #00BA7C;
}

.error-message {
    color: #E0245E;
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.4s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}