/* Variables - Modern Premium Light Color Palette */
:root {
    --bg-color: #f8fafc; /* Slate 50 (Very soft premium light background) */
    --card-bg: rgba(255, 255, 255, 0.85); /* Solid premium glass white */
    --card-border: rgba(15, 23, 42, 0.08); /* Soft slate border */
    --primary-gradient: linear-gradient(135deg, #7c3aed, #2563eb); /* Vibrant premium purple to blue */
    --hover-gradient: linear-gradient(135deg, #5b21b6, #1d4ed8);
    --text-primary: #0f172a; /* Slate 900 (High-contrast deep gray-blue) */
    --text-secondary: #475569; /* Slate 600 (Highly legible subtitle gray) */
    --text-accent: #2563eb; /* Blue 600 (Strong accent contrast) */
    --success: #059669; /* Emerald 600 */
    --error: #dc2626; /* Red 600 */
    --glow-color: rgba(124, 58, 237, 0.06); /* Very gentle purple background glow */
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Glow Background Effects */
.background-glow {
    position: fixed;
    top: -10%;
    left: 20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--glow-color) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
    animation: pulseGlow 10s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.15); }
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem 0 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.nav-links a.active {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.06);
}

/* Containers */
.container {
    max-width: 1200px;
    width: 100%;
    margin: auto;
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1;
}

/* Glassmorphism Card Base */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(15, 23, 42, 0.15);
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Hero Section (Index Page) */
.main-card {
    max-width: 750px;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: rgba(139, 92, 246, 0.1);
    color: #a78bfa;
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p.section-desc, .main-card p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

/* Features List */
.features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    text-align: left;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
}

.feature-item {
    display: flex;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.02);
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-item .icon {
    font-size: 1.5rem;
    line-height: 1.2;
}

.feature-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.feature-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35);
}

.btn-primary:hover {
    background: var(--hover-gradient);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-center {
    margin: 1.5rem auto;
}

/* API Section & Card */
.api-card {
    max-width: 600px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

/* Profile Card Display CSS */
.profile-card-display {
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1.5rem;
    text-align: center;
    position: relative;
    animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.profile-header {
    position: relative;
    display: inline-block;
    margin-bottom: 1.2rem;
}

.avatar-wrapper {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    padding: 4px;
    background: var(--primary-gradient);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.avatar-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: #222;
}

.nat-badge {
    position: absolute;
    bottom: 0;
    right: -5px;
    background: #fff;
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.profile-body h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.user-meta {
    font-size: 0.9rem;
    color: var(--text-accent);
    margin-bottom: 1.5rem;
}

.card-divider {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 1.5rem 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Spinner Loader */
.loader {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

.hidden {
    display: none !important;
}

/* Error Banner */
.error-message {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 1.2rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #fca5a5;
    animation: scaleIn 0.3s ease;
}

/* Skeletons (Loading UI) */
.skeleton-card {
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skeleton-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    animation: skeletonPulse 1.5s infinite ease-in-out;
}

.skeleton-text {
    height: 16px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.05);
    margin-bottom: 0.8rem;
    animation: skeletonPulse 1.5s infinite ease-in-out;
}

.skeleton-title {
    width: 160px;
    height: 22px;
}

.skeleton-subtitle {
    width: 220px;
    margin-bottom: 1.5rem;
}

.skeleton-details {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.skeleton-detail-item {
    height: 28px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.04);
    animation: skeletonPulse 1.5s infinite ease-in-out;
}

@keyframes skeletonPulse {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* API Flow Indicator */
.api-flow-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    gap: 0.5rem;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.step-num {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 0.75rem;
    color: var(--text-primary);
}

.flow-arrow {
    color: rgba(0, 0, 0, 0.15);
    font-weight: 700;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Animations */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }
    .features {
        grid-template-columns: 1fr;
    }
    .navbar {
        flex-direction: column;
        gap: 1rem;
    }
    .glass-card {
        padding: 2rem 1.5rem;
    }
    .api-flow-indicator {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    .flow-arrow {
        transform: rotate(90deg);
        align-self: center;
    }
}
