/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Space-Themed Greyscale Palette */
    --primary-color: #ffffff;           /* Pure white accent */
    --secondary-color: #e0e0e0;         /* Light grey */
    --accent-color: #b0b0b0;            /* Mid grey */
    --text-primary: #ffffff;            /* Pure white text */
    --text-secondary: #a0a0a0;          /* Muted grey */
    --text-tertiary: #808080;           /* Medium grey */
    --bg-primary: #0a0a0a;             /* Deep space black */
    --bg-secondary: #121212;           /* Dark grey */
    --bg-tertiary: #1a1a1a;            /* Lighter dark grey */
    --bg-card: rgba(30, 30, 30, 0.8);  /* Translucent dark card */
    --border-color: rgba(255, 255, 255, 0.1);  /* Translucent white border */
    --border-light: rgba(255, 255, 255, 0.05); /* Very subtle border */
    --success-color: #60d394;          /* Subtle green */
    --warning-color: #ffd97d;          /* Subtle yellow */
    --error-color: #ee6055;            /* Subtle red */
    --gradient-primary: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    --gradient-secondary: linear-gradient(135deg, rgba(160, 160, 160, 0.2) 0%, rgba(80, 80, 80, 0.1) 100%);
    --gradient-accent: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    --shadow-primary: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.7), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.4);
    --glow-color: rgba(255, 255, 255, 0.15);
}

body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-symbol {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.logo-text {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    margin: 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-tertiary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    margin: 3px 0;
    transition: 0.3s;
}


/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Particle Background */
.particle-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    opacity: 0.4;
    transition: all 0.3s ease;
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.5);
}

.particle::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.6) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.2;
    animation: pulse-glow 3s ease-in-out infinite;
}

.particle.entangled {
    opacity: 1;
    transform: scale(1.5);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
}

.particle.entangled::before {
    opacity: 0.5;
    animation: pulse-glow 1.5s ease-in-out infinite;
}


@keyframes pulse-glow {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.2;
    }
    50% { 
        transform: scale(1.2);
        opacity: 0.6;
    }
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    line-height: 1.1;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.4);
    font-family: 'Poppins', sans-serif;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 2px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
    z-index: 0;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Hero Visual - now handled by particle field */

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.section-subtitle {
    text-align: center;
    color: var(--text-tertiary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Projects Section */
.projects {
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.projects-particle-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.3;
}

.projects-particle-background .particle {
    opacity: 0.3;
}

.projects-particle-background .particle::before {
    opacity: 0.2;
}

.projects .container {
    position: relative;
    z-index: 2;
}

.project-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--text-tertiary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.project-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.project-card:hover::before {
    transform: scaleX(1);
}

.project-card:hover::after {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.project-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.project-status.completed {
    background: rgba(91, 52, 113, 0.15);
    color: var(--success-color);
}

.project-status.in-progress {
    background: rgba(127, 91, 143, 0.15);
    color: var(--warning-color);
}

.project-status.upcoming {
    background: rgba(163, 130, 174, 0.15);
    color: var(--secondary-color);
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: rgba(127, 91, 143, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(127, 91, 143, 0.15);
    transform: translateY(-1px);
}

.tech-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.tech-tag:hover .tech-icon {
    transform: scale(1.1);
}

.project-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Project action buttons inherit from base .btn styles */
.project-actions .btn:not(.btn-primary) {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.project-actions .btn:not(.btn-primary):hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* About Section */
.about-content {
    display: block;
    max-width: 900px;
    margin: 0 auto;
}

.about-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
    text-align: center;
}

.about-features {
    display: grid;
    gap: 1.5rem;
}

.feature {
    text-align: center;
}

.feature h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feature p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.about-visual {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.logo-placeholder svg {
    color: var(--primary-color);
    opacity: 0.8;
    transition: all 0.3s ease;
}

.logo-placeholder:hover svg {
    opacity: 1;
    transform: scale(1.05);
}

.logo-caption {
    color: var(--text-tertiary);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
}

/* Contact Section */
.contact {
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-methods {
    display: grid;
    gap: 1.5rem;
}

.contact-method h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-method p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-link:hover {
    text-decoration: underline;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--secondary-color);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-card);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: var(--shadow-large);
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--secondary-color);
    font-weight: 600;
}

.close {
    color: var(--text-secondary);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--secondary-color);
}

.modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.footer-section h3 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-card);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-primary);
        padding: 2rem 0;
        border-top: 1px solid var(--border-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .modal-header,
    .modal-body {
        padding: 1rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

#backToTop:hover {
    transform: translateY(0) scale(1.05);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.2);
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop svg {
    stroke: var(--text-primary);
}

/* External Link Icons */
.external-icon {
    font-size: 0.85em;
    margin-left: 4px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

a:hover .external-icon {
    opacity: 1;
}

/* Keyboard Navigation Focus Styles */
body.keyboard-nav *:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

body:not(.keyboard-nav) *:focus {
    outline: none;
}

/* Hero Animation */
.hero {
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

.hero.hero-loaded {
    opacity: 1;
}

.hero-title {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.hero-subtitle {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

.hero-buttons {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.7s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Transitions */
body {
    animation: pageLoad 0.5s ease-out;
}

@keyframes pageLoad {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Loading Overlay for Simulations */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    color: var(--text-primary);
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 0%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 1.1rem;
    margin-top: 20px;
}

/* Download Error/Success Messages */
.download-message {
    position: fixed;
    bottom: 80px;
    right: 30px;
    padding: 15px 25px;
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 2px;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1001;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.download-message.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.download-message.success {
    border-left: 2px solid var(--success-color);
    box-shadow: 0 0 40px rgba(96, 211, 148, 0.2);
}

.download-message.error {
    border-left: 2px solid var(--error-color);
    box-shadow: 0 0 40px rgba(238, 96, 85, 0.2);
}

.download-message svg {
    flex-shrink: 0;
    stroke: var(--text-primary);
}

/* Improved Typography for Documentation */
.doc-section p {
    font-size: 1.05rem;
    line-height: 2;
}

/* Responsive adjustments for new features */
@media (max-width: 768px) {
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .download-message {
        bottom: 70px;
        right: 20px;
        left: 20px;
    }
}