:root {
    --primary-color: #4f46e5;
    --secondary-color: #7c3aed;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-gray: #f8fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #475569;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-radius: 16px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
            radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

header {
    background: hsl(0, 0%, 98%);
    border-bottom: 1px solid hsl(0, 0%, 89.8%);
    padding: 1.5rem 0;
    position: relative;
    z-index: 10;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.logo-icon {
    width: 70px;
    height: 70px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.logo-text {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #06b6d4, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-shadow: none;
    letter-spacing: -0.02em;
}

main {
    flex: 1;
    padding: 2rem 0;
    position: relative;
    z-index: 5;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

.card-body {
    padding: 2rem;
}

.card-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: none;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 15px 0 rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px 0 rgba(79, 70, 229, 0.4);
}

.form-control {
    border: 2px solid var(--medium-gray);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background: white;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

footer {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 0;
    position: relative;
    z-index: 10;
}

.footer-content {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-content a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-content a:hover {
    color: white;
    text-decoration: underline;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 2rem auto;
    border: 4px solid rgba(79, 70, 229, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.prompt-image {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}

.prompt-image:hover {
    transform: scale(1.02);
}

/* Landing page specific styles */
.hero-content {
    padding: 2rem 0;
}

.stat-item {
    padding: 1rem 0;
}

.stat-item i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.feature-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card.h-100 {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.h-100:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .logo-text {
        font-size: 2rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .card-body {
        padding: 1.5rem;
    }

    main {
        padding: 1rem 0;
    }

    .hero-content {
        padding: 1rem 0;
    }

    .display-4 {
        font-size: 2rem;
    }

    .lead {
        font-size: 1.1rem;
    }
}

/* Accessibility improvements */
.btn:focus {
    outline: 3px solid rgba(79, 70, 229, 0.3);
    outline-offset: 2px;
}

.form-control:focus {
    outline: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}