/* Authentication Pages Styles */

/* Auth Section */
.auth-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
    position: relative;
    overflow: hidden;
}

.auth-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.15"/><circle cx="20" cy="80" r="0.5" fill="white" opacity="0.15"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.auth-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #6b7280;
    font-size: 1rem;
}

/* Error Message */
.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.error-message i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* OAuth Buttons */
.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 12px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    color: #374151;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.oauth-btn:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    transform: translateY(-1px);
}

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

.google-btn:hover {
    border-color: #ea4335;
    background: #fef7f7;
}

.github-btn:hover {
    border-color: #24292e;
    background: #f6f8fa;
}

.oauth-btn i {
    font-size: 1.2rem;
}

.google-btn i {
    color: #ea4335;
}

.github-btn i {
    color: #24292e;
}

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider span {
    background: white;
    color: #6b7280;
    padding: 0 1rem;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* Form Styles */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #374151;
    font-size: 0.9rem;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input.error {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #374151;
}

.error-text {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.error-text.show {
    display: block;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: -0.5rem 0 0.5rem 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #374151;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: #6366f1;
    border-color: #6366f1;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: #6366f1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Submit Button */
.auth-submit {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
    position: relative;
}

.auth-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.auth-submit .btn-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.auth-footer p {
    color: #6b7280;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Success Message */
.success-message {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.success-message i {
    font-size: 1.1rem;
    flex-shrink: 0;
    color: #16a34a;
}

/* Terms of Service */
.terms-container {
    margin: 1rem 0;
}

.terms-container .checkbox-container {
    align-items: flex-start;
    gap: 0.75rem;
}

.terms-container .checkmark {
    margin-top: 2px;
}

.terms-text {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.5;
}

.terms-text a {
    color: #6366f1;
    text-decoration: none;
}

.terms-text a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-section {
        padding: 80px 15px 20px;
    }
    
    .auth-card {
        padding: 2rem;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.5rem;
    }
    
    .auth-header h1 {
        font-size: 1.5rem;
    }
    
    .oauth-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 10px 14px;
    }
}

/* Navigation adjustments for auth pages */
.nav-logo a {
    text-decoration: none;
    color: inherit;
}

.nav-logo a:hover {
    color: inherit;
}
/*
 Dashboard Styles */
.dashboard-main {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    background-color: #f8fafc;
    padding: 2rem 0;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.dashboard-header p {
    font-size: 1.1rem;
    color: #6b7280;
}

.loading-container {
    text-align: center;
    padding: 4rem 0;
}

.loading-spinner {
    font-size: 2rem;
    color: #6366f1;
    margin-bottom: 1rem;
}

.dashboard-content {
    max-width: 1000px;
    margin: 0 auto;
}

.dashboard-section {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2 i {
    color: #6366f1;
}

/* Profile Card */
.profile-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    position: relative;
}

.profile-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
}

.profile-initials {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
}

.profile-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.profile-details p {
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.provider-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.provider-google {
    background-color: #fef2f2;
    color: #dc2626;
}

.provider-github {
    background-color: #f3f4f6;
    color: #374151;
}

.provider-email {
    background-color: #eff6ff;
    color: #2563eb;
}

/* Subscription Card */
.subscription-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.subscription-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.status-info p {
    color: #6b7280;
}

/* API Key Card */
.api-key-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.api-key-display {
    margin-bottom: 1rem;
}

.key-input-group {
    display: flex;
    gap: 0.5rem;
}

.key-input-group input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background-color: #f9fafb;
}

.btn-icon {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background-color: #f3f4f6;
    color: #6366f1;
}

.api-key-info {
    padding: 1rem;
    background-color: #eff6ff;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.api-key-info p {
    margin: 0;
    color: #1e40af;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #6b7280;
    font-size: 0.9rem;
}

/* Message Container */
.message-container {
    position: fixed;
    top: 90px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #10b981;
    z-index: 1000;
    display: none;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
}

.message-success {
    border-left-color: #10b981;
}

.message-error {
    border-left-color: #ef4444;
}

.message-warning {
    border-left-color: #f59e0b;
}

.message-info {
    border-left-color: #3b82f6;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.message-success .message-content i {
    color: #10b981;
}

.message-error .message-content i {
    color: #ef4444;
}

.message-warning .message-content i {
    color: #f59e0b;
}

.message-info .message-content i {
    color: #3b82f6;
}

/* Button Styles */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #374151;
}

.btn-outline:hover {
    background-color: #f3f4f6;
    border-color: #6366f1;
    color: #6366f1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-main {
        padding: 1rem 0;
    }
    
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .profile-info {
        flex-direction: column;
        text-align: center;
    }
    
    .subscription-status {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .key-input-group {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .message-container {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .profile-card,
    .subscription-card,
    .api-key-card,
    .stat-card {
        padding: 1rem;
    }
    
    .dashboard-header {
        margin-bottom: 2rem;
    }
    
    .dashboard-section {
        margin-bottom: 1.5rem;
    }
}