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

:root {
    
    --bg:           #09090b;   
    --bg-sidebar:   #030303;   
    --bg-card:      rgba(17, 17, 21, 0.7);
    --bg-input:     #18181b;

    --text-primary:   #fafafa;
    --text-secondary: #a1a1aa;

    --primary:      #2563eb;
    --primary-dark: #1d4ed8;
    --primary-glow: 0 0 25px rgba(37, 99, 235, 0.4);
    --primary-grad: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);

    --accent-pink:  #db2777;

    --border:       rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);

    --radius: 14px;

    --font: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text-primary);
    font-family: var(--font);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(100px);
    opacity: 0.14;
}
.bg-orb-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    top: -160px; right: -160px;
    animation: float-orb-1 18s ease-in-out infinite alternate;
}
.bg-orb-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, #db2777 0%, transparent 70%);
    bottom: -120px; left: -120px;
    animation: float-orb-2 22s ease-in-out infinite alternate;
}
.bg-orb-3 {
    width: 450px; height: 450px;
    background: radial-gradient(circle, #10b981 0%, transparent 70%);
    top: 40%; left: -200px;
    animation: float-orb-1 25s ease-in-out infinite alternate;
}

@keyframes float-orb-1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, 50px) scale(1.1); }
    100% { transform: translate(0, 0) scale(1); }
}
@keyframes float-orb-2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(50px, -40px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

header {
    background: rgba(9, 9, 11, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    height: 64px;
    max-height: 64px;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    user-select: none;
}

.logo-link img {
    height: 28px;
    max-height: 28px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
}

.logo-link .logo-wordmark {
    font-family: var(--font);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--text-primary);
}

.logo-link .logo-wordmark span {
    color: var(--primary);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    white-space: nowrap;
}

nav a:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.06);
}

nav a.active {
    color: var(--text-primary);
    font-weight: 600;
}

.nav-user {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 9999px;
}

.nav-btn {
    color: #fff !important;
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.15s;
    display: inline-block;
}

.nav-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

main {
    flex: 1;
    position: relative;
    z-index: 1;
}

.hero {
    max-width: 900px;
    margin: 5rem auto 2.5rem;
    text-align: center;
    padding: 0 1.5rem;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.5px;
    color: var(--text-primary);
}

.hero h1 .accent {
    color: var(--primary);
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 680px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.25rem 2rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.3);
}

.glass-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

.grid-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

.feature-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(8, 130, 255, 0.15);
    border: 1px solid rgba(8, 130, 255, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.9rem;
}

.feature-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.2s;
}
.feature-link:hover { gap: 0.5rem; }

.schema-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.schema-tag {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 0.55rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.schema-tag:hover {
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 255, 255, 0.05);
}

.tag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    background-color: currentColor;
    box-shadow: 0 0 8px currentColor;
    position: relative;
}

.tag-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid currentColor;
    opacity: 0.5;
    animation: tag-pulse 2s infinite ease-out;
}

@keyframes tag-pulse {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.section-title .accent {
    background: linear-gradient(135deg, #3b82f6 0%, #a855f7 50%, #db2777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    display: inline-block;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2rem;
    line-height: 1.65;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    background: var(--primary-grad);
    color: #fff;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--primary-glow), 0 6px 20px rgba(37, 99, 235, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0.75rem 1.75rem;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.centered-container {
    max-width: 440px;
    width: 100%;
    margin: auto;
}

.auth-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-input {
    background: rgba(66, 66, 66, 0.5);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.9rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
    width: 100%;
}

.form-input::placeholder { color: rgba(255,255,255,0.25); }

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8,130,255,0.15);
}

.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #fff;
    color: #1f2937;
    border: none;
    border-radius: 8px;
    padding: 0.7rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    margin-bottom: 1.25rem;
    text-decoration: none;
}

.google-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255,255,255,0.18);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 1.25rem 0;
    gap: 0.6rem;
}

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

.error-message {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.app-iframe-container {
    flex: 1;
    width: 100%;
    height: calc(100vh - 60px);
    position: relative;
    overflow: hidden;
}

.app-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: var(--bg);
    display: block;
}

footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

footer a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
}

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

header {
    overflow: visible;
}

.user-menu {
    position: relative;
}

.user-menu details {
    position: relative;
}

.user-menu summary {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-menu summary:hover,
.user-menu details[open] summary {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.user-menu summary span {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.user-menu details[open] summary span {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    padding: 0.45rem;
    background: rgba(17, 17, 21, 0.98);
    border: 1px solid var(--border-hover);
    border-radius: 10px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.55rem 0.65rem 0.65rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--border);
}

.user-info span {
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.user-info strong {
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown a {
    display: block;
    color: #f87171 !important;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.55rem 0.65rem;
    border-radius: 7px;
}

.user-dropdown a:hover {
    color: #fca5a5 !important;
    background: rgba(239, 68, 68, 0.12);
}