* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

nav a:hover {
    background-color: rgba(255,255,255,0.2);
    opacity: 0.9;
}

.hero {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a3a 100%);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 300px;
    display: flex;
    align-items: center;
}

.data-animation {
    position: relative;
    width: 100%;
    height: 200px;
}

.binary-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 2px,
        rgba(0, 255, 127, 0.03) 2px,
        rgba(0, 255, 127, 0.03) 4px
    );
    animation: binaryScroll 20s linear infinite;
}

.binary-rain::before {
    content: "01001001 01101110 01100110 01101111 01110010 01101101 01100001 01110100 01101001 01101111 01101110 00100000 01000100 01100001 01110100 01100001";
    position: absolute;
    top: 20px;
    left: -100%;
    color: rgba(0, 255, 127, 0.3);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    animation: scrollText 15s linear infinite;
    white-space: nowrap;
}

.floating-data {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.data-bit {
    position: absolute;
    color: #00ff7f;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 1.2rem;
    animation: float 3s ease-in-out infinite;
    opacity: 0.7;
}

.data-bit:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.data-bit:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: 0.5s;
}

.data-bit:nth-child(3) {
    top: 30%;
    left: 70%;
    animation-delay: 1s;
}

.data-bit:nth-child(4) {
    top: 80%;
    left: 20%;
    animation-delay: 1.5s;
}

.data-bit:nth-child(5) {
    top: 40%;
    left: 40%;
    animation-delay: 2s;
}

.data-bit:nth-child(6) {
    top: 70%;
    left: 60%;
    animation-delay: 2.5s;
}

.circuit-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.line {
    position: absolute;
    background: linear-gradient(90deg, transparent, #00ff7f, transparent);
    opacity: 0.4;
}

.line.horizontal {
    top: 30%;
    left: 0;
    width: 100%;
    height: 2px;
    animation: pulse 2s ease-in-out infinite;
}

.line.vertical {
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(0deg, transparent, #00ff7f, transparent);
    animation: pulse 2s ease-in-out infinite 0.5s;
}

.line.diagonal {
    top: 20%;
    left: 20%;
    width: 60%;
    height: 2px;
    transform: rotate(45deg);
    animation: pulse 2s ease-in-out infinite 1s;
}

.data-nodes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #00ff7f;
    border-radius: 50%;
    animation: nodeGlow 2s ease-in-out infinite;
}

.node:nth-child(1) {
    top: 20%;
    left: 30%;
    animation-delay: 0s;
}

.node:nth-child(2) {
    top: 70%;
    left: 70%;
    animation-delay: 0.5s;
}

.node:nth-child(3) {
    top: 50%;
    left: 10%;
    animation-delay: 1s;
}

.node:nth-child(4) {
    top: 40%;
    left: 90%;
    animation-delay: 1.5s;
}

@keyframes binaryScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-10px); }
}

@keyframes scrollText {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); opacity: 0.7; }
    50% { transform: translateY(-10px) scale(1.1); opacity: 1; }
}

@keyframes pulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.8; }
}

@keyframes nodeGlow {
    0%, 100% { 
        box-shadow: 0 0 5px #00ff7f;
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 20px #00ff7f, 0 0 30px #00ff7f;
        transform: scale(1.2);
    }
}

.section {
    padding: 4rem 0;
    background-color: white;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.section:nth-child(even) {
    background-color: #f8f9fa;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #2c3e50;
    position: relative;
}

.section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 0.5rem auto;
    border-radius: 2px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.card h3 a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.card h3 a:hover {
    color: #764ba2;
}

.card p {
    color: #6c757d;
    line-height: 1.5;
}

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .logo {
        font-size: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 2rem 0;
        margin-bottom: 1rem;
    }

    .card {
        padding: 1rem;
    }
}

/* ===========================================
   Explorer Styles
   =========================================== */

.logo-link {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo-link:hover {
    opacity: 0.9;
}

.explorer-main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.explorer-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.breadcrumb-item {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.breadcrumb-item:hover {
    background-color: rgba(102, 126, 234, 0.1);
    color: #764ba2;
}

.breadcrumb-item:last-child {
    color: #2c3e50;
    font-weight: 600;
    pointer-events: none;
}

.breadcrumb-separator {
    color: #adb5bd;
    font-weight: 300;
    user-select: none;
}

/* File List */
.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-item {
    border-bottom: 1px solid #f1f3f4;
}

.file-item:last-child {
    border-bottom: none;
}

.file-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    gap: 1rem;
}

.file-link:hover {
    background-color: #f8f9fa;
}

.file-item.is-directory .file-link:hover {
    background-color: rgba(102, 126, 234, 0.08);
}

.file-icon {
    font-size: 1.5rem;
    width: 2rem;
    text-align: center;
    flex-shrink: 0;
}

.file-name {
    flex: 1;
    font-weight: 500;
    word-break: break-word;
}

.file-item.is-directory .file-name {
    color: #667eea;
}

.file-size {
    color: #6c757d;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Empty directory */
.empty-directory {
    text-align: center;
    padding: 4rem 2rem;
    color: #6c757d;
}

.empty-directory p {
    font-size: 1.1rem;
}

/* Loading state */
.explorer-content.loading {
    opacity: 0.5;
    pointer-events: none;
}

.explorer-content {
    transition: opacity 0.2s ease;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Responsive adjustments for explorer */
@media (max-width: 768px) {
    .breadcrumbs {
        font-size: 0.95rem;
    }

    .file-link {
        padding: 0.875rem 0.75rem;
    }

    .file-icon {
        font-size: 1.3rem;
    }

    .file-size {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .breadcrumbs {
        font-size: 0.875rem;
        gap: 0.25rem;
    }

    .breadcrumb-item {
        padding: 0.2rem 0.35rem;
    }

    .file-link {
        padding: 0.75rem 0.5rem;
        gap: 0.75rem;
    }

    .file-icon {
        font-size: 1.2rem;
        width: 1.5rem;
    }
}

/* ===========================================
   File Embed Styles
   =========================================== */

.file-embed-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.file-embed-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.file-embed-header .file-size {
    color: #6c757d;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.download-button:active {
    transform: translateY(0);
}

.file-embed-content {
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.embed-image {
    max-width: 100%;
    max-height: 80vh;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.embed-video {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    background: #000;
}

.embed-audio {
    width: 100%;
    max-width: 500px;
}

.embed-text {
    width: 100%;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 0;
}

.embed-unsupported {
    color: #6c757d;
    font-size: 1.1rem;
    text-align: center;
    padding: 2rem;
}

@media (max-width: 768px) {
    .file-embed-header {
        padding: 0.875rem 1rem;
    }

    .download-button {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }

    .file-embed-content {
        padding: 1rem;
    }

    .embed-text {
        padding: 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .file-embed-header {
        padding: 0.75rem;
    }

    .download-button {
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
    }

    .file-embed-content {
        padding: 0.75rem;
    }

    .embed-text {
        padding: 0.75rem;
        font-size: 0.8rem;
    }
}
