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

:root {
    --radius: 0.5rem;
    --background: hsl(210, 40%, 98%);
    --foreground: hsl(222.2, 84%, 4.9%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(222.2, 84%, 4.9%);
    --popover: hsl(0, 0%, 100%);
    --popover-foreground: hsl(222.2, 84%, 4.9%);
    --primary: hsl(221.2, 83.2%, 53.3%);
    --primary-foreground: hsl(210, 40%, 98%);
    --secondary: hsl(210, 40%, 96%);
    --secondary-foreground: hsl(222.2, 84%, 4.9%);
    --muted: hsl(210, 40%, 96%);
    --muted-foreground: hsl(215.4, 16.3%, 46.9%);
    --accent: hsl(262.1, 83.3%, 57.8%);
    --accent-foreground: hsl(210, 40%, 98%);
    --destructive: hsl(0, 84.2%, 60.2%);
    --destructive-foreground: hsl(210, 40%, 98%);
    --border: hsl(214.3, 31.8%, 91.4%);
    --input: hsl(214.3, 31.8%, 91.4%);
    --ring: hsl(221.2, 83.2%, 53.3%);
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}

.dark {
    --background: hsl(0, 0%, 0%);
    --foreground: hsl(200, 6.6667%, 91.1765%);
    --card: hsl(228, 9.8039%, 10%);
    --card-foreground: hsl(0, 0%, 85.0980%);
    --popover: hsl(0, 0%, 0%);
    --popover-foreground: hsl(200, 6.6667%, 91.1765%);
    --primary: hsl(221.2, 83.2%, 53.3%);
    --primary-foreground: hsl(210, 40%, 98%);
    --secondary: hsl(195.0000, 15.3846%, 94.9020%);
    --secondary-foreground: hsl(222.2, 84%, 4.9%);
    --muted: hsl(0, 0%, 9.4118%);
    --muted-foreground: hsl(210, 3.3898%, 46.2745%);
    --accent: hsl(262.1, 83.3%, 57.8%);
    --accent-foreground: hsl(210, 40%, 98%);
    --destructive: hsl(0, 84.2%, 60.2%);
    --destructive-foreground: hsl(210, 40%, 98%);
    --border: hsl(210, 5.2632%, 14.9020%);
    --input: hsl(207.6923, 27.6596%, 18.4314%);
    --ring: hsl(221.2, 83.2%, 53.3%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

/* Header Styles */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: hsl(var(--card) / 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid hsl(var(--border));
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: hsl(var(--primary));
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--primary-foreground));
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: hsl(var(--foreground));
}

.logo-text p {
    font-size: 0.75rem;
    color: hsl(var(--muted-foreground));
}

.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: color 0.3s;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.nav-link:hover {
    color: hsl(var(--primary));
}

.auth-buttons {
    display: none;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .auth-buttons {
        display: flex;
    }
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover {
    background: var(--primary) / 0.9;
}

.btn-ghost {
    background: transparent;
    color: var(--foreground);
}

.btn-ghost:hover {
    background: var(--accent) / 0.1;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-outline {
    border: 2px solid hsl(var(--card));
    color: var(--card);
    background: transparent;
}

.btn-outline:hover {
    background: var(--card);
    color: var(--foreground);
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0.95;
}

.hero-content {
    position: relative;
    padding: 5rem 0 7rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
}

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

@media (min-width: 1024px) {
    .hero-text {
        text-align: left;
    }
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-foreground);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

.hero-title .highlight {
    color: #fcd34d;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--primary-foreground) / 0.9;
    margin-bottom: 2rem;
    line-height: 1.6;
}

@media (min-width: 1024px) {
    .hero-description {
        font-size: 1.25rem;
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row;
    }
}

@media (min-width: 1024px) {
    .hero-buttons {
        justify-content: flex-start;
    }
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.status-card {
    position: absolute;
    bottom: -1.5rem;
    right: -1.5rem;
    background: var(--card);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    animation: bounce-soft 2s infinite;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.status-dot {
    width: 0.75rem;
    height: 0.75rem;
    background: #10b981;
    border-radius: 50%;
}

.status-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
}

.uptime-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--secondary) / 0.3;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 1rem;
}

@media (min-width: 1024px) {
    .section-title {
        font-size: 2.5rem;
    }
}

.section-description {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 48rem;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature-card {
    background: var(--card);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
}

.feature-description {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.feature-image {
    width: 100%;
    height: 12rem;
    object-fit: cover;
    border-radius: 0.75rem;
}

/* StudyBuddy Section */
.studybuddy {
    padding: 5rem 0;
    background: var(--card);
}

.chat-container {
    max-width: 64rem;
    margin: 0 auto;
}

.chat-interface {
    background: var(--secondary) / 0.5;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--border);
}

.chat-messages {
    background: var(--card);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    max-height: 24rem;
    overflow-y: auto;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.message.user {
    justify-content: flex-end;
}

.message-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.ai-avatar {
    background: linear-gradient(135deg, var(--accent), var(--primary));
    color: white;
}

.user-avatar {
    background: var(--muted);
    color: var(--muted-foreground);
}

.message-content {
    border-radius: 1rem;
    padding: 1rem;
    max-width: 20rem;
}

.ai-message {
    background: var(--secondary);
    color: var(--foreground);
    border-top-left-radius: 0.25rem;
}

.user-message {
    background: var(--primary);
    color: var(--primary-foreground);
    border-top-right-radius: 0.25rem;
    margin-left: auto;
}

.chat-input {
    display: flex;
    gap: 1rem;
}

.input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: var(--background);
    color: var(--foreground);
}

.quick-questions {
    margin-top: 1.5rem;
}

.quick-questions p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
}

.question-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* About Section */
.about {
    padding: 5rem 0;
    background: var(--secondary) / 0.3;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
    background: var(--card);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial {
    background: var(--secondary) / 0.5;
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.stars {
    display: flex;
    color: #fbbf24;
    margin-bottom: 1.5rem;
}

.testimonial-content {
    color: var(--foreground);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-image {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.author-name {
    font-weight: 600;
    color: var(--foreground);
}

.author-title {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background: var(--secondary) / 0.3;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-form {
    background: var(--card);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background: var(--background);
    color: var(--foreground);
}

.form-input.error,
.form-textarea.error {
    border-color: var(--destructive);
}

.form-textarea {
    height: 8rem;
    resize: vertical;
}

.error-message {
    color: var(--destructive);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin: 1rem 0;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Footer */
.footer {
    background: var(--card);
    border-top: 1px solid var(--border);
    padding: 3rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-description {
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    max-width: 24rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--secondary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground);
    text-decoration: none;
    transition: background-color 0.3s;
}

.social-link:hover {
    background: var(--secondary) / 0.8;
}

.footer-section h3 {
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.3s;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
}

.footer-link:hover {
    color: var(--foreground);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--muted-foreground);
}

/* Animations */
@keyframes bounce-soft {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

/* Icon styles */
.icon {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}