/* Color Library */
:root {
    /* Color Library */
    --primary-bg: #282a42;
    --primary-card: #30334e;
    --primary-button: #666cff;
    --primary-button-hover: #5c61e6;
    --primary-button-border: #5256cc;
    
    /* Neutral Colors */
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --gray: #6c757d;
    --dark-gray: #495057;
    
    /* Text Colors */
    --text-primary: #d7d8ed;
    --text-secondary: #a0a3bd;
    --text-muted: #6c757d;
    --error-color: #ff4757;
    --success-color: #2ed573;
    
    /* Shadow */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Loading and Empty States */
.loading-state,
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.loading-state i,
.empty-state i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-button);
}

.loading-state i.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.empty-state p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.empty-state small {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.text-center {
    text-align: center;
}

/* Disabled button styles */
.btn-primary.disabled,
.btn-primary:disabled {
    background-color: var(--text-muted);
    border-color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-primary.disabled:hover,
.btn-primary:disabled:hover {
    background-color: var(--text-muted);
    border-color: var(--text-muted);
    transform: none;
}

/* Limit reached alert styles */
.domain-usage-alert.limit-reached {
    background-color: rgba(255, 71, 87, 0.1);
    border-color: var(--error-color);
    color: var(--error-color);
}

.domain-usage-alert.limit-reached i {
    color: var(--error-color);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Container */
.container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

/* Login Card */
.login-card {
    background: var(--primary-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Login Header */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header .logo {
    margin-bottom: 24px;
}

.login-header .logo-image {
    max-width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-header p {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 400;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    position: relative;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    font-size: 16px;
    z-index: 2;
    transition: var(--transition-normal);
}

.input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid transparent;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 16px;
    transition: var(--transition-normal);
    backdrop-filter: blur(10px);
}

.input-wrapper input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-button);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(102, 108, 255, 0.1);
}

.input-wrapper input:focus + .input-icon {
    color: var(--primary-button);
}

/* Button Styles */
.btn-primary {
    background: var(--primary-button);
    color: var(--text-primary);
    border: 1px solid var(--primary-button-border);
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    min-height: 50px;
    height: 56px;
    text-decoration: none;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-button-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 108, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary i {
    transition: var(--transition-normal);
}

.btn-primary:hover i {
    transform: translateX(4px);
}

/* Loading state styles */
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border-color: #495057;
}

.btn-primary:disabled:hover {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    transform: none;
    box-shadow: none;
}

.btn-primary .fa-spinner {
    font-size: 18px;
}

.btn-primary .fa-arrow-right {
    font-size: 16px;
}

/* Rate Limiting Styles */
.rate-limited {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    border-color: #ee5a52;
    color: white;
}

.rate-limited:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    transform: none;
    box-shadow: none;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .login-card {
        padding: 32px 24px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .input-wrapper input {
        padding: 14px 14px 14px 44px;
        font-size: 15px;
    }
    
    .btn-primary {
        padding: 14px 20px;
        font-size: 15px;
        min-height: 52px;
        height: 52px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.notification.error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.notification i {
    font-size: 18px;
    flex-shrink: 0;
}

.notification span {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* Focus States */
.input-wrapper input:focus {
    transform: scale(1.02);
}

/* Hover Effects */
.input-wrapper:hover input {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* Error States */
.input-wrapper.error input {
    border-color: var(--error-color);
    background: rgba(255, 71, 87, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

.input-wrapper.error .input-icon {
    color: var(--error-color);
}

.input-wrapper.error input:focus {
    border-color: var(--error-color);
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
}

/* Error Message */
.error-message {
    color: var(--error-color);
    font-size: 14px;
    font-weight: 500;
    margin-top: 0;
    display: none;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition-normal);
    height: 0;
    overflow: hidden;
}

.error-message.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    margin-top: 8px;
    height: auto;
}

.error-message i {
    font-size: 12px;
}

.error-message span {
    color: var(--error-color);
}

/* Success States */
.input-wrapper.success input {
    border-color: var(--success-color);
    background: rgba(46, 213, 115, 0.05);
}

.input-wrapper.success .input-icon {
    color: var(--success-color);
}

/* Error Message for Rate Limiting */
.error-message.rate-limit {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    border: 1px solid #ee5a52;
    color: white;
}

.error-message.rate-limit i {
    color: white;
}

/* Logout Message */
.logout-message {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    border: 1px solid #ff9800;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.logout-message i {
    color: white;
    font-size: 16px;
}

.logout-message span {
    color: white;
    font-weight: 500;
}

/* Copyright */
.copyright {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 400;
    opacity: 0.8;
}
    