@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #eef2ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius: 12px;
}

[data-theme="dark"] {
    --primary-color: #818cf8;
    --primary-hover: #6366f1;
    --primary-light: #1e1b4b;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
}

a {
    text-decoration: none;
    color: inherit;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--primary-light) 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--primary-color);
    opacity: 0.1;
    border-radius: 50%;
    top: -250px;
    right: -250px;
    animation: float 6s ease-in-out infinite;
}

.auth-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    opacity: 0.08;
    border-radius: 50%;
    bottom: -200px;
    left: -200px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-logo {
    margin-bottom: 1.5rem;
}

.auth-logo img {
    height: 48px;
    width: auto;
}

.auth-logo-text {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-label i {
    font-size: 18px;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all 0.3s ease;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper .form-control {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--primary-color);
}

.password-toggle i {
    font-size: 20px;
}

.password-strength {
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
    font-size: 12px;
    font-weight: 500;
    padding-top: 8px;
}

.password-strength::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    transition: all 0.3s ease;
}

.password-strength.weak::before {
    width: 25%;
    background: var(--danger);
}

.password-strength.weak {
    color: var(--danger);
}

.password-strength.fair::before {
    width: 50%;
    background: var(--warning);
}

.password-strength.fair {
    color: var(--warning);
}

.password-strength.good::before {
    width: 75%;
    background: #3b82f6;
}

.password-strength.good {
    color: #3b82f6;
}

.password-strength.strong::before {
    width: 100%;
    background: var(--success);
}

.password-strength.strong {
    color: var(--success);
}

.captcha-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.captcha-group .form-control {
    flex: 1;
}

.captcha-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
}

.captcha-text {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 3px;
    color: var(--text-primary);
    user-select: none;
}

.captcha-refresh {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.captcha-refresh:hover {
    transform: rotate(90deg);
}

.captcha-refresh.rotating {
    animation: rotate 0.5s linear;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.captcha-refresh i {
    font-size: 20px;
}

.form-options {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.5rem;
}

.forgot-link {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    height: 52px;
    padding: 0 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    margin-top: 0.5rem;
}

.auth-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-btn i {
    font-size: 20px;
}

.auth-btn-secondary {
    width: 100%;
    height: 52px;
    padding: 0 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.auth-btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
}

.auth-footer p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

@media (max-width: 640px) {
    .auth-container {
        padding: 1rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .auth-title {
        font-size: 24px;
    }

    .auth-subtitle {
        font-size: 14px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .captcha-group {
        flex-direction: column;
        align-items: stretch;
    }

    .captcha-display {
        justify-content: center;
    }
}


/* Floating Chat Widget */
.floating-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
}

.chat-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.chat-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-menu-header {
    padding: 20px;
    border-bottom: 1px solid #e8eaf2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-menu-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #0a0a0a;
}

.chat-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f2f5;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #626380;
    transition: all 0.2s ease;
}

.chat-close-btn:hover {
    background: #e8eaf2;
}

.chat-menu-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    background: #f0f2f5;
    transition: all 0.2s ease;
    text-decoration: none;
}

.chat-option:hover {
    background: #e8eaf2;
    transform: translateX(5px);
}

.chat-option-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    flex-shrink: 0;
}

.chat-option-icon.support {
    background: #7c3aed;
}

.chat-option-icon.whatsapp {
    background: #25d366;
}

.chat-option-icon.telegram {
    background: #0088cc;
}

.chat-option-icon.email {
    background: #ea4335;
}

.chat-option-text h5 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: #0a0a0a;
}

.chat-option-text p {
    margin: 0;
    font-size: 13px;
    color: #626380;
}

@media (max-width: 768px) {
    .floating-chat-widget {
        bottom: 20px;
        right: 20px;
    }
    
    .chat-toggle-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .chat-menu {
        width: 280px;
    }
}
