:root {
    /* Colors */
    --bg-primary: #0a192f;
    --bg-secondary: #112240;
    --bg-tertiary: #233554;
    --text-primary: #e6f1ff;
    --text-secondary: #8892b0;
    --accent-primary: #64ffda;
    --accent-secondary: #ffd700;
    --error: #ff6b6b;
    --success: #64ffda;

    /* Fonts */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Effects */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.3);
    --glow: 0 0 10px rgba(100, 255, 218, 0.3);
    --glass-bg: rgba(17, 34, 64, 0.7);
    --glass-border: 1px solid rgba(230, 241, 255, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    font-family: var(--font-mono);
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: 1px solid var(--accent-primary);
    border-radius: 4px;
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    background: transparent;
    transition: var(--transition);
}

.btn:hover {
    background: rgba(100, 255, 218, 0.1);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: #4cdbb9;
    transform: translateY(-2px);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9998;
    background: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    padding: var(--spacing-sm) 0;
    border-bottom: var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-primary);
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
}

.nav-menu a {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.nav-menu a:hover {
    color: var(--accent-primary);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    padding: 10px;
    cursor: pointer;
    border: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--accent-primary);
    transition: var(--transition);
    pointer-events: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 var(--spacing-lg);
    max-width: 100%;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: clamp(40px, 8vw, 80px);
    line-height: 1.1;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.hero p {
    font-size: clamp(16px, 3vw, 20px);
    color: var(--accent-primary);
    font-family: var(--font-mono);
    margin-bottom: var(--spacing-xs);
}

.hero-subtitle {
    color: var(--text-secondary) !important;
    margin-bottom: var(--spacing-md) !important;
}

.hero-org {
    font-size: 0.9rem !important;
    color: var(--text-secondary) !important;
    max-width: 600px;
}

/* Carousel Styles */
.carousel-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.carousel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right,
        var(--bg-primary) 0%,
        var(--bg-primary) 10%,
        rgba(10, 25, 47, 0.85) 25%,
        rgba(10, 25, 47, 0.6) 40%,
        rgba(10, 25, 47, 0.3) 55%,
        transparent 70%);
    z-index: 2;
    pointer-events: none;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide.fading {
    opacity: 0.5;
    z-index: 0;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
    text-align: left;
}

/* Info Showcase Section */
.info-showcase {
    padding: var(--spacing-xl) 0;
    background: var(--bg-secondary);
}

.info-showcase-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.info-text {
    flex: 1;
    max-width: 500px;
}

.info-text h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--accent-primary);
}

.info-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.info-image {
    flex: 1;
    max-width: 500px;
}

.info-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.info-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Info Showcase Reverse (image on left, text on right) */
.info-showcase-reverse {
    background: var(--bg-primary);
}

.info-showcase-reverse .info-showcase-content {
    flex-direction: row-reverse;
}

/* Portal Actions */
.portal-actions {
    padding: var(--spacing-xl) 0;
    background: var(--bg-primary);
}

.portal-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    text-align: center;
}

.portal-container h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
}

.portal-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    font-size: 1.1rem;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.action-card {
    background: var(--bg-secondary);
    padding: var(--spacing-lg) var(--spacing-md);
    border-radius: 8px;
    text-align: left;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.action-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg);
}

.action-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.action-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.action-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-lg) 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--bg-tertiary);
}

.action-arrow {
    position: absolute;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    font-size: 1.5rem;
    color: var(--accent-primary);
    opacity: 0;
    transform: translateX(-20px);
    transition: var(--transition);
}

.action-card:hover .action-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Quick Info */
.quick-info {
    padding: var(--spacing-lg) 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--bg-tertiary);
}

.info-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    text-align: center;
}

.info-card h3 {
    font-family: var(--font-mono);
    color: var(--accent-primary);
    font-size: 1.1rem;
    margin-bottom: var(--spacing-xs);
}

.info-card p {
    color: var(--text-primary);
    font-weight: 600;
}

/* Footer */
footer {
    padding: var(--spacing-md) 0;
    text-align: center;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: var(--bg-primary);
}

/* =========================================
   Dynamic JS Element Styles
   ========================================= */

/* Skeleton Loading */
.skeleton-card {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
    height: 200px;
    border-radius: 12px;
    margin-bottom: 1rem;
}

@keyframes skeleton {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Loading Spinner */
.spinner-container {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.spinner-text {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* File Preview */
.file-preview-error {
    background-color: rgba(231, 76, 60, 0.1);
    border: 2px solid var(--error-color);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeInUp 0.3s ease;
}

.file-preview-error p,
.file-preview-error span {
    color: var(--error-color);
    margin: 0;
    font-weight: 600;
}

.file-preview-success {
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border: 2px solid var(--success-color);
    padding: 1.5rem;
    border-radius: 12px;
    margin-top: 1rem;
    animation: fadeInUp 0.3s ease;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.file-icon {
    font-size: 2.5rem;
}

.file-details {
    flex: 1;
    min-width: 150px;
}

.file-name {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
}

.file-size {
    margin: 0.25rem 0 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Copy Button Feedback */
.copy-feedback {
    background-color: var(--success-color);
    color: var(--bg-primary);
}

.copy-btn-styled {
    margin-left: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Progress Steps */
.progress-steps-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.progress-step-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.5rem;
    font-weight: 700;
    transition: all 0.3s;
}

.step-circle.active {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

.step-circle.completed {
    background-color: var(--success-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast-hiding {
    animation: toastSlideOut 0.3s ease forwards;
}

.modal-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* Loading Modal */
.loading-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.loading-modal-content {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(100, 255, 218, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.loading-modal-overlay.active .loading-modal-content {
    transform: translateY(0);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(100, 255, 218, 0.1);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.loading-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Progress Steps in Loading Modal */
.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 2rem;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--bg-tertiary);
    z-index: 0;
}

.progress-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 33.33%;
}

.step-indicator {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border: 2px solid var(--bg-secondary);
}

.step-checkmark {
    display: none;
}

.step-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Active Step */
.progress-step.active .step-indicator {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(100, 255, 218, 0.1);
}

.progress-step.active .step-label {
    color: var(--accent-primary);
}

/* Completed Step */
.progress-step.completed .step-indicator {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

.progress-step.completed .step-number {
    display: none;
}

.progress-step.completed .step-checkmark {
    display: block;
    font-size: 1rem;
}

.progress-step.completed .step-label {
    color: var(--accent-primary);
}