:root {
    --bg-color: #0a0a0c;
    --card-bg: #16161a;
    --accent-color: #3e63dd;
    --text-primary: #ffffff;
    --text-secondary: #9494a5;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --border-color: rgba(255, 255, 255, 0.08);
    --success: #2ecc71;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

.screen {
    display: none;
    min-height: 100vh;
    padding: 2rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

/* Loading State */
#loading {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.loader {
    width: 48px;
    height: 48px;
    border: 3px solid var(--accent-color);
    border-bottom-color: transparent;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
    margin-bottom: 1.5rem;
}

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

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent-color);
}

.auth-badge {
    background: rgba(46, 204, 113, 0.1);
    color: var(--success);
    padding: 0.4rem 0.8rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

/* Hero Section */
.hero {
    margin-bottom: 2rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.product-image {
    width: 100%;
    aspect-ratio: 1/1;
    background: linear-gradient(45deg, #1e1e24, #121216);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-header {
    padding: 1.5rem;
}

.product-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.product-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Data Groups */
.passport-data {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Desktop Responsive Layout */
@media (min-width: 900px) {
    main {
        display: grid;
        grid-template-columns: 350px 1fr;
        gap: 3rem;
        align-items: start;
    }

    .hero {
        position: sticky;
        top: 2rem;
    }

    .passport-data {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    /* Span full width for specific sections */
    .data-group:nth-child(3), /* Product Journey */
    .data-group.restricted,
    .trust-center {
        grid-column: 1 / -1;
    }
}

.data-group {
    background: var(--glass-bg);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.data-group h2 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.icon {
    font-style: normal;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    background: rgba(255,255,255,0.05);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

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

.trace-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.trace-item span {
    font-weight: 600;
}

.text-content {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Restricted Section */
.restricted {
    text-align: center;
    background: linear-gradient(rgba(62, 99, 221, 0.05), transparent);
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    margin-top: 1rem;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Footer */
footer {
    margin-top: 4rem;
    text-align: center;
    padding-bottom: 2rem;
}

footer p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.8rem;
}

/* Error State */
#error {
    justify-content: center;
    align-items: center;
}

.error-content {
    text-align: center;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    margin-top: 1.5rem;
    cursor: pointer;
}

/* Timeline Styling */
.timeline {
    margin-top: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.25rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-event {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-event:last-child {
    margin-bottom: 0;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -1.5rem;
    top: 0.25rem;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-color);
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.event-date {
    font-size: 0.7rem;
    color: var(--accent-color);
    font-weight: 600;
    text-transform: uppercase;
}

.event-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0.1rem 0;
}

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

.event-location {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Trust Center */
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.trust-badge { background: var(--glass-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 1.2rem; display: flex; flex-direction: column; align-items: center; text-align: center; transition: all 0.3s ease; }
.trust-badge:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.15); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.trust-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; margin-bottom: 1rem; }
.trust-content h4 { font-size: 0.95rem; margin-bottom: 0.25rem; color: var(--text-primary); }
.trust-content p { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; }

/* Landing Page Redesign Styles */

/* Navigation Bar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    margin: 1rem auto 3rem;
    background: rgba(22, 22, 26, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: sticky;
    top: 1rem;
    z-index: 100;
    border-radius: 100px;
    max-width: 1300px;
    width: 95%;
}

.top-nav .logo {
    margin-left: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    margin: 0 auto;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

.auth-buttons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-btn {
    text-decoration: none;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-btn-outline {
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    background: transparent;
}

.nav-btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-btn-primary {
    color: #fff;
    background: var(--accent-color);
    border: none;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .top-nav {
        padding: 1rem;
    }
}

.landing-hero {
    position: relative;
    padding: 6rem 1rem 4rem;
    text-align: center;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 60vw;
    height: 60vw;
    max-width: 800px;
    max-height: 800px;
    background: radial-gradient(circle, rgba(62,99,221,0.15) 0%, rgba(10,10,12,0) 70%);
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: float 8s ease-in-out infinite;
}

.landing-hero h1 {
    font-size: clamp(3rem, 6vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #a8b9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fade-in-up 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-hero .subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 3rem;
    animation: fade-in-up 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fade-in-up 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.glow-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(62,99,221,0.3);
}

.glow-btn:hover {
    box-shadow: 0 0 30px rgba(62,99,221,0.6);
    transform: translateY(-2px);
}

.landing-section {
    padding: 5rem 0;
    position: relative;
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

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

.glass-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    border-color: rgba(62, 99, 221, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(62, 99, 221, 0.1);
}

.glass-card.glow-success:hover {
    border-color: rgba(46, 204, 113, 0.3);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(46, 204, 113, 0.1);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.feature-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-desc {
    color: var(--text-secondary);
    line-height: 1.6;
}

.infra-diagram {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: stretch;
}

.infra-node {
    flex: 1 1 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.infra-node .node-icon {
    width: 64px;
    height: 64px;
    background: rgba(62, 99, 221, 0.1);
    border: 1px solid rgba(62, 99, 221, 0.2);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.infra-node h4 { margin-bottom: 0.5rem; }
.infra-node p { font-size: 0.85rem; color: var(--text-secondary); }

/* Animations */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.05); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
}
