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

/* Light Theme Variables */
:root {
    --bg-gradient-start: #f8fafc;
    --bg-gradient-end: #e0f2fe;
    --text-main: #1f2937;
    --text-muted: #475569; /* ADA Compliant AAA Contrast */
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(248, 250, 252, 0.9);
    
    --primary-cyan: #06b6d4;
    --purple: #8b5cf6;
    --warning: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --orange: #f97316;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(180deg, var(--bg-gradient-start), var(--bg-gradient-end)) !important;
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    padding-top: 80px;
}

.glass-navbar {
    background: var(--nav-bg) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
}
.navbar-brand { 
    color: var(--text-main) !important; 
    transition: all 0.3s ease;
}
.navbar-brand:hover { 
    color: var(--primary-cyan) !important; 
    transform: scale(1.02);
}
.nav-link { color: var(--text-main) !important; }
.nav-link:hover { color: var(--primary-cyan) !important; }

.brand-text {
    background: linear-gradient(90deg, var(--primary-cyan), #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800 !important;
}

.logo-circle {
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
}
.navbar-brand:hover .logo-circle {
    transform: rotate(15deg);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

.gradient-text {
    background: linear-gradient(90deg, #0284c7, #7c3aed);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.text-cyan { color: var(--primary-cyan) !important; }
.text-purple { color: var(--purple) !important; }
.text-warning { color: var(--warning) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-orange { color: var(--orange) !important; }
.bg-cyan { background-color: var(--primary-cyan) !important; color: white !important; }

/* Fixed Text Colors for Accessibility */
.text-white { color: #ffffff !important; }
.text-light { color: #f8f9fa !important; }
.text-white-50 { color: rgba(255, 255, 255, 0.5) !important; }

/* Theme support */
.dark-theme {
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.7);
    --border-color: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(15, 23, 42, 0.9);
}

.light-theme {
    /* Variables already in :root but explicit here too */
    --bg-gradient-start: #f8fafc;
    --bg-gradient-end: #e0f2fe;
    --text-main: #1f2937;
    --text-muted: #475569;
    --card-bg: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0, 0, 0, 0.08);
    --nav-bg: rgba(248, 250, 252, 0.9);
}

.btn-cyan {
    background-color: var(--primary-cyan);
    color: white;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
}
.btn-cyan:hover, .btn-cyan:focus {
    background-color: #0891b2;
    transform: translateY(-2px);
    color: white;
}
.btn-outline-cyan {
    background-color: transparent;
    border: 2px solid var(--primary-cyan);
    color: var(--primary-cyan);
    border-radius: 12px;
    transition: all 0.3s ease;
}
.btn-outline-cyan:hover {
    background-color: var(--primary-cyan);
    color: white;
}

.hero-section {
    min-height: calc(100vh - 80px);
}

/* Grid Cards */
.tool-card {
    background-color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    cursor: pointer;
}
.tool-card:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

/* Circular Progress UI */
.score-card {
    background-color: rgba(255, 255, 255, 0.7);
}

.circular-progress {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(var(--primary-cyan) 288deg, rgba(0,0,0,0.1) 0deg);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.inner-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: white; 
    position: absolute;
    color: var(--text-main) !important;
}

/* Promo Banner */
.promo-banner {
    background: linear-gradient(90deg, #60a5fa, #c084fc);
    z-index: 1000;
}

/* Forms */
.form-control, .form-select {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-main);
    border-radius: 12px;
}
.form-control::placeholder {
    color: var(--text-muted);
}
.form-control:focus {
    background-color: white;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 0 0.25rem rgba(6, 182, 212, 0.25);
    color: var(--text-main);
}
textarea.bg-dark {
    background-color: #f1f5f9 !important;
    color: var(--text-main) !important;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Theme Adaptive Navbar Toggler */
.light-theme .navbar-toggler {
    border-color: rgba(0,0,0,0.1) !important;
}
.light-theme .navbar-toggler-icon {
    filter: invert(1); /* Makes the white icon dark */
}

/* Ensure glass cards have good contrast */
.light-theme .glass-card {
    background: rgba(255, 255, 255, 0.9);
}
.dark-theme .glass-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Fix for links in navbar */
.light-theme .nav-link {
    color: #1f2937 !important;
}
.dark-theme .nav-link {
    color: #f8fafc !important;
}
.nav-link:hover {
    color: var(--primary-cyan) !important;
}
/* --- AI Agent UI Enhancements --- */
.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
}

.dot-pulse {
    background: var(--primary-cyan);
    box-shadow: 0 0 0 rgba(6, 182, 212, 0.4);
    animation: pulse-cyan 2s infinite;
}

@keyframes pulse-cyan {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(6, 182, 212, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
    }
}

.job-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
}

.job-item:hover {
    transform: translateX(8px);
    background: rgba(6, 182, 212, 0.05) !important;
    border-left-color: var(--primary-cyan);
}

.job-item.active {
    background: rgba(6, 182, 212, 0.1) !important;
    border-left-color: var(--primary-cyan);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.1);
}

#agentLogs div {
    border-left: 2px solid rgba(6, 182, 212, 0.3);
    padding-left: 10px;
    margin-bottom: 5px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Premium Login Modal (Window Dialog Style) */
.modal-content.glass-card {
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 28px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1.5rem 2rem !important;
}

.modal-body {
    padding: 2rem !important;
}

.auth-btn-group .btn {
    height: 54px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-radius: 16px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-btn-group .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

#googleSignInBtn {
    background: white;
    color: #1f2937;
    border: none;
}

#guestSignInBtn {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    font-weight: 600;
    margin: 1.5rem 0;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-divider:not(:empty)::before { margin-right: 1rem; }
.auth-divider:not(:empty)::after { margin-left: 1rem; }

.auth-input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    height: 50px;
    border-radius: 14px !important;
    padding: 0 1.25rem !important;
}

.auth-input:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--primary-cyan) !important;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15) !important;
}

.text-apple {
    color: #1f2937 !important;
    transition: all 0.3s ease;
}
.dark-theme .text-apple {
    color: #f8fafc !important;
}
.text-apple:hover {
    color: var(--primary-cyan) !important;
}
