/* Base Styles */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glow {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

@keyframes photon-move {
    0% { transform: translateX(0) scale(1); opacity: 1; }
    100% { transform: translateX(100px) scale(0.8); opacity: 0; }
}

/* Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    margin-right: 10px;
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient);
    border-radius: 2px;
}

.cta-button {
    background: var(--gradient);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Hero Section */
.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--gradient);
    clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
    z-index: -1;
}

.hero-section {
    padding: 180px 0 100px;
    position: relative;
}

.hero-content {
    max-width: 600px;
    margin-bottom: 60px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.title-gradient {
    background: linear-gradient(90deg, #f8fafc, #c7d2fe);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray-light);
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-visual {
    position: relative;
    height: 200px;
}

.quantum-particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    opacity: 0.6;
}

.quantum-particle:nth-child(1) {
    top: 20%;
    left: 15%;
    animation: float 4s ease-in-out infinite;
}

.quantum-particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation: float 5s ease-in-out infinite 1s;
}

.quantum-particle:nth-child(3) {
    top: 30%;
    left: 70%;
    animation: float 6s ease-in-out infinite 0.5s;
}

/* Process Section */
.process-section {
    padding: 100px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 60px;
    font-size: 1.1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.process-timeline {
    max-width: 900px;
    margin: 0 auto;
}

.process-step {
    margin-bottom: 60px;
    position: relative;
}

.step-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-right: 20px;
    flex-shrink: 0;
}

.step-content {
    display: flex;
    gap: 40px;
    background: var(--light);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.step-visual {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.step-description {
    flex: 1;
    padding: 10px;
}

.step-description p, .step-description ul {
    margin-bottom: 15px;
}

.step-description ul {
    padding-left: 20px;
}

/* Visual Elements */
.alice-visual, .bob-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.visual-label {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.bits-container, .bases-container, .results-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.bit, .basis {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-weight: 600;
}

.bit-0 { background: #fee2e2; color: #b91c1c; }
.bit-1 { background: #dbeafe; color: #1d4ed8; }
.basis-plus { background: #dcfce7; color: #15803d; }
.basis-cross { background: #fef3c7; color: #b45309; }

.transmission-visual {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.alice-node, .bob-node {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.node-icon {
    font-size: 1.8rem;
}

.quantum-channel {
    flex: 1;
    height: 2px;
    background: var(--primary-light);
    position: relative;
    overflow: hidden;
}

.photon {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: photon-move 2s linear infinite;
}

.photon-plus-0 { background: #ef4444; left: 10%; animation-delay: 0s; }
.photon-cross-1 { background: #8b5cf6; left: 30%; animation-delay: 0.5s; }
.photon-plus-0:nth-of-type(3) { left: 50%; animation-delay: 1s; }
.photon-cross-1:nth-of-type(4) { left: 70%; animation-delay: 1.5s; }

.eve-intercept {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fee2e2;
    padding: 10px 15px;
    border-radius: 8px;
    margin: 15px 0;
    color: #b91c1c;
    font-weight: 500;
}

.eve-icon {
    font-size: 1.5rem;
}

.toggle-eve {
    background: var(--primary-light);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.toggle-eve:hover {
    background: var(--primary-dark);
}

.comparison-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.compare-icon {
    font-size: 1.5rem;
    color: var(--gray);
}

.matching-bases {
    display: flex;
    gap: 8px;
    margin-left: 20px;
}

.matching-base {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-weight: 600;
    background: #dcfce7;
    color: #15803d;
}

.outcome-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 15px 0;
    font-size: 0.9rem;
}

.outcome-header {
    font-weight: 600;
    padding: 5px;
    border-bottom: 1px solid var(--gray-light);
}

.outcome-cell {
    padding: 5px;
    border-bottom: 1px solid var(--gray-light);
}

.correct {
    background: #dcfce7;
    color: #15803d;
}

.random {
    background: #fef3c7;
    color: #b45309;
}

.detection-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.eve-detected {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 20px;
}

.eve-detected .icon {
    font-size: 2rem;
}

.eve-detected .text {
    font-weight: 600;
    color: #b91c1c;
    margin-top: 5px;
}

.message-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.alice-message, .bob-decrypts {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    width: 100%;
    justify-content: center;
}

.message-label {
    font-weight: 600;
    color: var(--primary-dark);
}

.xor-operation {
    font-size: 1.5rem;
    color: var(--gray);
}

.secret-key, .encrypted-message {
    display: flex;
    gap: 5px;
}

.key-bit {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 600;
    background: #dbeafe;
    color: #1d4ed8;
}

.encrypted-bit {
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 600;
    background: #e2e8f0;
    color: var(--dark);
}

.equals {
    font-size: 1.5rem;
    color: var(--gray);
    margin: 0 10px;
}

.transmission-arrow {
    font-size: 1.5rem;
    color: var(--gray);
}

pre {
    background: #f1f5f9;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
    margin: 15px 0;
}

/* FAQ Section */
.faq-section {
    padding: 100px 0;
    background: var(--light);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    cursor: pointer;
}

.faq-question h3 {
    font-size: 1.1rem;
    color: var(--dark);
}

.faq-toggle {
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s;
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-card.active .faq-answer {
    padding: 0 20px 20px;
    max-height: 500px;
}

/* Add this to the end of the existing resources.css file */

.faq-card.active .faq-toggle {
    transform: rotate(45deg);
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: var(--gradient);
    color: white;
}

.cta-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-card h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.cta-card p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.primary-button {
    display: inline-block;
    background: white;
    color: var(--primary-dark);
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.primary-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.glow-on-hover {
    animation: pulse 2s infinite;
}

/* Footer Styles */
.main-footer {
    background: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    flex: 1;
    min-width: 250px;
}

.footer-tagline {
    opacity: 0.8;
    margin-top: 15px;
    line-height: 1.6;
}

.footer-links {
    flex: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.link-group {
    min-width: 150px;
}

.link-group h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: white;
}

.link-group a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.link-group a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    color: white;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.social-icon:hover {
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .step-content {
        flex-direction: column;
    }
    
    .step-visual {
        min-width: auto;
        margin-bottom: 20px;
    }
    
    .nav-links {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}
/* Add these new styles to your existing resources.css */

/* Enhanced Header with Animation */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s ease;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.main-header.scrolled {
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-link {
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Quantum Background Animation */
.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--gradient);
    clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
    z-index: -1;
    overflow: hidden;
}

/* Quantum Particles Background */
.quantum-particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.quantum-particle-bg {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    pointer-events: none;
}

/* Floating Animation Variations */
@keyframes float-up {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

@keyframes float-down {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(20px) rotate(-5deg); }
}

@keyframes float-left {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-20px); }
}

@keyframes float-right {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(20px); }
}

/* Add these to your existing quantum-particle animations */
.quantum-particle:nth-child(1) {
    animation: float-up 8s ease-in-out infinite;
}

.quantum-particle:nth-child(2) {
    animation: float-down 7s ease-in-out infinite 1s;
}

.quantum-particle:nth-child(3) {
    animation: float-left 9s ease-in-out infinite 0.5s;
}

/* New Glow Effect */
@keyframes subtle-glow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.hero-title .title-gradient {
    animation: subtle-glow 3s ease-in-out infinite alternate;
}

/* Enhanced CTA Button */
.cta-button {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.15) 0%,
        rgba(255,255,255,0.3) 50%,
        rgba(255,255,255,0.15) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
    z-index: -1;
}

.cta-button:hover::before {
    transform: translateX(100%);
}

/* Responsive Header */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        transition: transform 0.4s ease;
    }
    
    .nav-links.active {
        transform: translateY(0);
    }
    
    .nav-link {
        padding: 12px 0;
    }
    
    .cta-button {
        display: none;
    }
}