/* Global Styles */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --danger-color: #e74c3c;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* Color Variables */
:root {
    --primary-red: #ff2a6d;
    --primary-blue: #05d9e8;
    --primary-purple: #d300c5;
    --primary-pink: #ff2a92;
    --primary-cyan: #00f7ff;
}

/* Header/Navbar - Targeted Effects */
.logo a {
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.nav-links a {
    color: #ffffff;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-cyan);
}

/* Main Hero Text - No Glow */
.hero h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-blue), var(--primary-purple));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-flow 4s linear infinite;
}

.hero p {
    font-size: 1.2rem;
    background: linear-gradient(90deg, var(--primary-pink), var(--primary-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: subtle-gradient 6s linear infinite;
}

/* Animations */
@keyframes gradient-flow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

@keyframes subtle-gradient {
    0% { background-position: 0% center; }
    100% { background-position: 100% center; }
}

/* File Browser Styles */
.file-browser {
    display: flex;
    flex-wrap: wrap; /* Wrap to new lines if needed */
    gap: 1.5rem;
}

.file-browser::-webkit-scrollbar {
    height: 10px;
}
.file-browser::-webkit-scrollbar-thumb {
    background-color: #666;
    border-radius: 5px;
}

.file-category {
    background: #2d2d2d;
    border-radius: 10px;
    border: 1px solid #404040;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.2s ease;
}

.file-category.collapsed {
    background: #252525;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.category-header {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #363636, #404040);
    border-bottom: 1px solid #404040;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-header:hover {
    background: linear-gradient(135deg, #404040, #4a4a4a);
}

.category-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #6366f1;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e2e8f0;
    flex: 1;
}

.category-count {
    font-size: 0.85rem;
    color: #6366f1;
    margin-right: 1rem;
    background: rgba(99, 102, 241, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

.category-toggle {
    color: #6366f1;
    font-weight: bold;
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.category-toggle:hover {
    background: rgba(99, 102, 241, 0.2);
}

.file-list {
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    background: #2d2d2d;
    transition: all 0.3s ease;
}

.file-list.collapsed {
    display: none;
}

.file-item {
    display: flex;
    flex-direction: column; /* stack elements vertically */
    align-items: stretch;
    padding: 1rem;
    background: #363636;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-height: 100px;
    height: 100%; /* make each tile fill its grid cell */
    border: 1px solid #404040;
}

.file-item:hover {
    background: #404040;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.file-icon {
    font-size: 1.8rem;
    margin-right: 1rem;
    width: 40px;
    text-align: center;
    flex-shrink: 0;
    color: #6366f1;
}

.file-info {
    flex-grow: 1;
    min-width: 0; /* Allows text truncation */
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 400;
}

.download-btn {
    width: 100%; /* make button take full width of container */
    padding: 0.75rem;
    font-size: 1rem;
    text-align: center;
    box-sizing: border-box;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.4);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .file-list[data-file-count^="3"],
    .file-list[data-file-count^="4"],
    .file-list[data-file-count^="5"],
    .file-list[data-file-count^="6"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .file-list {
        grid-template-columns: 1fr !important;
    }
    
    .file-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .file-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .file-info {
        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .file-name {
        white-space: normal;
    }
}

/* Hamburger Menu - Simple Style */
.hamburger span {
    background-color: #e0e0e0;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* Header & Navigation */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #2d2d2d;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #e2e8f0;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: #e2e8f0;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #404040;
    color: #e2e8f0;
}

.btn-secondary:hover {
    background-color: #4a4a4a;
    transform: translateY(-2px);
}

/* Homepage Styles */
.homepage {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    text-align: center;
    padding: 4rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #f1f5f9;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #94a3b8;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.feature-card {
    background: #2d2d2d;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    border: 1px solid #404040;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #6366f1;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: #f1f5f9;
}

.feature-card p {
    color: #94a3b8;
}

/* Footer */
footer {
    background-color: #252525;
    color: #e2e8f0;
    padding: 1rem 0;
    text-align: center;
}

.footer-bottom {
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 20px;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background-color: #2d2d2d;
        padding: 2rem;
        box-shadow: 0 5px 10px rgba(0,0,0,0.3);
        transition: left 0.3s;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Downloads Header */
.downloads-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #404040;
}

.downloads-title {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    background: linear-gradient(90deg, #3498db, #2ecc71, #3498db);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 3s linear infinite;
    display: inline-block;
    padding: 0 1rem;
}

@keyframes gradientFlow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.downloads-subtitle {
    font-size: 1.1rem;
    color: #94a3b8;
    margin: 0;
}

/* File Browser Styles */
.file-browser {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

/* File Category Styles - Fixed Version */
.file-category {
    background: #2d2d2d;
    border-radius: 10px;
    border: 1px solid #404040;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.file-category.collapsed {
    background: #2d2d2d;
}

.category-header {
    padding: 1rem 1.5rem;
    background: #363636;
    border-bottom: 1px solid #404040;
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.category-header:hover {
    background: #404040;
}

.category-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: #6366f1;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
    flex: 1;
}

.category-count {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-right: 1rem;
    background: rgba(99, 102, 241, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

.category-toggle {
    color: #6366f1;
    font-weight: bold;
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.file-list {
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    background: #2d2d2d;
}

.file-list.collapsed {
    display: none;
}

.file-item {
    padding: 1.25rem;
    background: #363636;
    border: 1px solid #404040;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s ease;
}

.file-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border-color: #6366f1;
    background: #404040;
}

.file-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: #6366f1;
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #f1f5f9;
    word-break: break-word;
}

.file-size {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.download-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #6366f1;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.download-btn:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Loading States */
.loading {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
    grid-column: 1 / -1;
}

.spinner {
    border: 4px solid rgba(255,255,255,0.1);
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-files, .error {
    text-align: center;
    padding: 2rem;
    grid-column: 1 / -1;
}

.no-files {
    color: #94a3b8;
    background: #2d2d2d;
}

.error {
    color: #f87171;
    background: #422626;
}

.error small {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .file-browser {
        grid-template-columns: 1fr;
    }
    
    .downloads-title {
        font-size: 1.8rem;
    }
    
    .downloads-subtitle {
        font-size: 1rem;
    }
}

/* File Browser Styles */
.file-browser {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.file-category {
    background: #2d2d2d;
    border-radius: 10px;
    border: 1px solid #404040;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    overflow: hidden;
}

.file-category.collapsed .category-toggle {
    transform: rotate(0deg);
}

.file-category:not(.collapsed) .category-toggle {
    transform: rotate(180deg);
}

.category-header {
    padding: 15px 20px;
    background: #363636;
    display: flex;
    align-items: center;
    cursor: pointer;
    border-bottom: 1px solid #404040;
}

.category-header:hover {
    background: #404040;
}

.category-icon {
    font-size: 24px;
    margin-right: 12px;
    color: #6366f1;
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    color: #f1f5f9;
    flex: 1;
}

.category-count {
    font-size: 13px;
    color: #94a3b8;
    margin-right: 15px;
    background: rgba(99, 102, 241, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

.category-toggle {
    color: #6366f1;
    font-weight: bold;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.file-list {
    padding: 1.5rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    background: #2d2d2d;
    border-radius: 0 0 10px 10px;
}

.file-item {
    padding: 16px;
    background: #363636;
    border: 1px solid #404040;
    border-radius: 8px;
}

.file-icon {
    font-size: 32px;
    color: #6366f1;
    margin-bottom: 10px;
}

.file-name {
    font-weight: 500;
    color: #f1f5f9;
    margin-bottom: 6px;
}

.file-size {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.download-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #6366f1;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.download-btn:hover {
    background: #4f46e5;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    grid-column: 1 / -1;
}

.spinner {
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.no-files, .error {
    text-align: center;
    padding: 30px;
    background: #2d2d2d;
    border-radius: 8px;
    margin: 20px 0;
    grid-column: 1 / -1;
}

.error {
    color: #f87171;
    background: #422626;
}

.error small {
    color: #94a3b8;
    display: block;
    margin-top: 10px;
    font-size: 0.9em;
}

.feature-icon img {
    display: block;
    object-fit: contain;
    width: 70px;
    height: 70px;
    padding: 5px;
    background: rgba(40, 40, 40, 0.8);
    border-radius: 10px;
    border: 1px solid #888;
    box-shadow: 0 0 10px rgba(150, 150, 150, 0.4),
                inset 0 0 10px rgba(150, 150, 150, 0.1);
    transition: all 0.3s ease;
    filter: brightness(1.1);
}

.feature-card:hover .feature-icon img {
    box-shadow: 0 0 20px rgba(200, 200, 200, 0.6),
                inset 0 0 15px rgba(200, 200, 200, 0.2);
    transform: scale(1.05);
    border-color: #aaa;
}