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

:root {
    --primary: #4F46E5;
    --primary-light: #818CF8;
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --bg-gradient-1: #E0E7FF;
    --bg-gradient-2: #F3E8FF;
    --card-bg: rgba(255, 255, 255, 0.85);
    --card-border: rgba(255, 255, 255, 0.3);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: transparent;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* Hero Section */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1rem;
}

.badge {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #4F46E5, #9333EA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    max-width: 800px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 3rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(79, 70, 229, 0.5);
}

/* Glassmorphism Card for Markdown Content */
.content-wrapper {
    flex: 1;
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
    width: 100%;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* Markdown Styling */
.markdown-body {
    font-size: 1rem;
}

.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    color: var(--text-main);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.markdown-body h1 {
    font-size: 2.25rem;
    font-weight: 800;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding-bottom: 1rem;
    margin-top: 0;
}

.markdown-body h2 {
    font-size: 1.5rem;
}

.markdown-body p, .markdown-body li {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.markdown-body ul, .markdown-body ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.markdown-body a {
    color: var(--primary);
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body blockquote {
    border-left: 4px solid var(--primary-light);
    padding-left: 1rem;
    margin-left: 0;
    color: var(--text-muted);
    background: rgba(79, 70, 229, 0.05);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.markdown-body code {
    background: rgba(0,0,0,0.05);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}



/* Footer */
footer {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* Loading State */
.loader {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(79, 70, 229, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin: 2rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast Notification */
.toast-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.toast-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.toast-card {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 2.5rem 2rem 2rem;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast-overlay.active .toast-card {
    transform: translateY(0) scale(1);
}

.toast-icon {
    margin-bottom: 1.25rem;
    display: inline-block;
    background: linear-gradient(135deg, #E0E7FF 0%, #F3E8FF 100%);
    border-radius: 20px;
    padding: 0.75rem;
    animation: float-icon 3s ease-in-out infinite;
}

@keyframes float-icon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.toast-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.toast-message {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.toast-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.toast-btn:hover {
    background: #4338CA;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.45);
}

/* Responsive */
@media (max-width: 768px) {
    .glass-card {
        padding: 1.5rem;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .cta-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
}

/* App Embedded Mode */
body.app-mode header,
body.app-mode footer {
    display: none !important;
}

body.app-mode {
    background: #ffffff;
}

body.app-mode .content-wrapper {
    margin: 0;
    padding: 0;
    max-width: 100%;
}

body.app-mode .glass-card {
    border: none;
    box-shadow: none;
    background: transparent;
    padding: 1rem 1.25rem;
    border-radius: 0;
}
