/* Data Sizes Explorer Styles */

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* changed from 250px */
    gap: 2.5rem; /* slightly increased spacing */
    margin-top: 3rem;
    justify-items: center; /* ensures stat cards are centered */
}

.stat {
    margin: 0 auto; /* centers stat box horizontally */
    text-align: center;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-height: 150px;
    min-width: 320px;
}



.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* Progress Indicator */
.progress-indicator {
    position: sticky;
    top: 80px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    margin: 0 auto 1rem;
    max-width: 1200px;
    position: relative;
    overflow: hidden;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    width: 10%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-dots {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.dot.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scale(1.3);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.dot:hover {
    transform: scale(1.2);
    background: #999;
}

.dot.active:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

/* Data Units Section */
.data-units-section {
    padding: 4rem 0;
    background: #f8f9fa;
}

.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.unit-controls h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #333;
}

.unit-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.unit-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #666;
}

.unit-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.unit-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.navigation-controls {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Current Unit Display */
.current-unit-section {
    margin-bottom: 4rem;
}

.unit-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    min-height: 400px;
    transition: all 0.5s ease;
}

.unit-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    overflow: hidden;
}

.unit-info h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.unit-details {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.detail-label {
    font-weight: 600;
    color: #666;
}

#unitDescription {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 2rem;
}

.unit-analogy {
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.unit-analogy h4 {
    margin-bottom: 0.5rem;
    color: #667eea;
    font-weight: 600;
}

.unit-analogy p {
    color: #555;
    font-style: italic;
}

/* Comparison Section */
.comparison-section {
    margin-bottom: 4rem;
}

.comparison-section h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #333;
}

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

.comparison-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.comparison-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

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

.comparison-item h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.comparison-item p {
    color: #666;
    font-size: 0.95rem;
}

/* Scale Visualization */
.scale-section {
    margin-bottom: 4rem;
}

.scale-section h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #333;
}

.scale-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
}

.scale-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    position: relative;
    margin-bottom: 1rem;
}

.scale-marker {
    position: absolute;
    top: -6px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/* Facts Section */
.facts-section h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #333;
}

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

.fact-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
    border-top: 4px solid transparent;
}

.fact-card:nth-child(1) { border-top-color: #667eea; }
.fact-card:nth-child(2) { border-top-color: #764ba2; }
.fact-card:nth-child(3) { border-top-color: #f093fb; }

.fact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.fact-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.fact-card h4 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: #333;
}

.fact-card p {
    color: #666;
    line-height: 1.6;
}

/* Upload Demo Section */
.upload-demo-section {
    padding: 4rem 0;
    background: white;
}

.upload-demo-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    color: #333;
}

.upload-demo-section > .container > p {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 3rem;
}

.upload-area {
    border: 3px dashed #ddd;
    border-radius: 15px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
    margin-bottom: 2rem;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: scale(1.02);
}

.upload-icon {
    color: #999;
    margin-bottom: 1rem;
}

.upload-area p {
    color: #666;
    font-size: 1.1rem;
}

.file-analysis {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid #667eea;
}

.file-info h3 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.file-breakdown {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.breakdown-label {
    font-weight: 600;
    color: #666;
}

#fileComparison {
    font-style: italic;
    color: #555;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* Visual Elements */
.visual-bit {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

.visual-byte {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 200px;
}

.bit-square {
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 8px;
    animation: bitFlip 3s infinite;
}

.bit-square:nth-child(even) {
    animation-delay: 0.5s;
}

.visual-large-unit {
    position: relative;
    width: 250px;
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    overflow: hidden;
}

.visual-large-unit::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.1) 10px,
        rgba(255, 255, 255, 0.1) 20px
    );
    animation: slidePattern 4s linear infinite;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

@keyframes bitFlip {
    0%, 100% { background: #667eea; }
    50% { background: #764ba2; }
}

@keyframes slidePattern {
    0% { transform: translateX(-20px) translateY(-20px); }
    100% { transform: translateX(20px) translateY(20px); }
}

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

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .unit-card {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }
    
    .controls-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .unit-selector {
        justify-content: center;
    }
    
    .comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .facts-grid {
        grid-template-columns: 1fr;
    }
    
    .scale-labels {
        font-size: 0.7rem;
    }
    
    .progress-dots {
        gap: 0.5rem;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .unit-info h2 {
        font-size: 2rem;
    }
    
    .unit-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .nav-btn {
        padding: 0.5rem 1rem;
    }
}