@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600&display=swap");

/* ==================== ROOT VARIABLES ==================== */
:root {
    --primary-color: #00aaff;
    --bg-dark: #0a0a0f;
    --bg-darker: #05050a;
    --text-light: #ffffff;
    --text-muted: #ffffff;
    --accent-glow: rgba(0, 170, 255, 0.3);
    --card-bg: rgba(15, 15, 25, 0.8);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background: url('bg_image.jpg') center/cover fixed no-repeat;
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(2px);
    pointer-events: none;
    z-index: 0;
}

/* ==================== NAVIGATION ==================== */
.nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 2rem 0;
    backdrop-filter: blur(30px) saturate(180%);
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(0, 170, 255, 0.1), 
                0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    font-size: 2.4rem;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.logo-bracket {
    color: var(--primary-color);
    font-size: 2.8rem;
}

.logo:hover .logo-text {
    color: var(--primary-color);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    flex: 1;
    padding-top: 10rem;
    padding-bottom: 5rem;
    position: relative;
    z-index: 2;
}

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

/* ==================== HERO SECTION ==================== */
.hero-section {
    text-align: center;
    margin-bottom: 6rem;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.icon-wrapper {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(0, 170, 255, 0.2),
                0 8px 32px rgba(0, 170, 255, 0.1);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 16px rgba(0, 170, 255, 0.2),
                    0 8px 32px rgba(0, 170, 255, 0.1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 24px rgba(0, 170, 255, 0.4),
                    0 16px 48px rgba(0, 170, 255, 0.2);
    }
}

.main-title {
    font-size: 5rem;
    font-weight: 900;
    color: var(--text-light);
    text-shadow: 0 0 30px rgba(0, 170, 255, 0.3);
}

.subtitle {
    font-size: 1.8rem;
    color: var(--text-muted);
    max-width: 600px;
}

/* ==================== UPLOAD SECTION ==================== */
.upload-section {
    margin-bottom: 4rem;
}

.upload-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 4rem;
    box-shadow: 0 8px 32px rgba(0, 170, 255, 0.15),
                0 4px 8px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}

.upload-card:hover {
    border-color: rgba(0, 170, 255, 0.6);
    box-shadow: 0 20px 60px rgba(0, 170, 255, 0.3),
                0 8px 16px rgba(0, 0, 0, 0.2);
}

.upload-area {
    text-align: center;
    padding: 4rem 2rem;
    border: 3px dashed rgba(0, 170, 255, 0.3);
    border-radius: 15px;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.upload-area.drag-over {
    background: rgba(0, 170, 255, 0.1);
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.upload-area i {
    font-size: 6rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    display: block;
}

.upload-area h3 {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.upload-area p {
    font-size: 1.6rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.file-hint {
    font-size: 1.4rem !important;
    color: rgba(255, 255, 255, 0.5) !important;
}

.upload-btn {
    margin-top: 2rem;
    padding: 1.5rem 3rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 170, 255, 0.5);
    color: var(--text-light);
    font-size: 1.6rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(0, 170, 255, 0.2);
}

.upload-btn:hover {
    background: rgba(0, 170, 255, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 170, 255, 0.4);
}

.upload-btn i {
    font-size: 2.4rem;
}

/* ==================== FILES SECTION ==================== */
.files-section {
    margin-bottom: 4rem;
    animation: fadeIn 0.5s ease;
}

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

.files-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 170, 255, 0.15);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header h2 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-light);
}

.clear-btn {
    padding: 1rem 2rem;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff4444;
    font-size: 1.4rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition-smooth);
}

.clear-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff4444;
    transform: translateY(-2px);
}

.files-hint {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(0, 170, 255, 0.1);
    border: 1px solid rgba(0, 170, 255, 0.3);
    border-radius: 10px;
    margin-bottom: 2rem;
    font-size: 1.4rem;
    color: var(--text-muted);
}

.files-hint i {
    font-size: 2rem;
    color: var(--primary-color);
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
    min-height: 100px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    cursor: move;
    transition: var(--transition-smooth);
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 170, 255, 0.5);
    transform: translateX(5px);
}

.file-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.drag-handle {
    font-size: 2.4rem;
    color: var(--text-muted);
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.file-icon {
    font-size: 3.6rem;
    color: #ff4444;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 1.3rem;
    color: var(--text-muted);
}

.file-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(0, 170, 255, 0.1);
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    min-width: 50px;
    text-align: center;
}

.remove-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 10px;
    color: #ff4444;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.remove-btn:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff4444;
    transform: scale(1.1);
}

.action-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.add-more-btn,
.merge-btn {
    padding: 1.5rem 3rem;
    font-size: 1.6rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.add-more-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
}

.add-more-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.merge-btn {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.3), rgba(0, 170, 255, 0.2));
    border: 1px solid var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 4px 20px rgba(0, 170, 255, 0.3);
}

.merge-btn:hover {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.4), rgba(0, 170, 255, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 170, 255, 0.5);
}

.add-more-btn i,
.merge-btn i {
    font-size: 2rem;
}

/* ==================== PROCESSING SECTION ==================== */
.processing-section {
    margin-bottom: 4rem;
    animation: fadeIn 0.5s ease;
}

.processing-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6rem 4rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 170, 255, 0.15);
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 3rem;
    border: 4px solid rgba(0, 170, 255, 0.2);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.processing-card h3 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.processing-card p {
    font-size: 1.6rem;
    color: var(--text-muted);
}

/* ==================== SUCCESS SECTION ==================== */
.success-section {
    margin-bottom: 4rem;
    animation: fadeIn 0.5s ease;
}

.success-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 6rem 4rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 170, 255, 0.15);
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid rgba(0, 255, 0, 0.3);
    border-radius: 50%;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-icon i {
    font-size: 5rem;
    color: #00ff88;
}

.success-card h3 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.success-card p {
    font-size: 1.6rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.success-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.download-btn,
.restart-btn {
    padding: 1.5rem 3rem;
    font-size: 1.6rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition-smooth);
}

.download-btn {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.3), rgba(0, 170, 255, 0.2));
    border: 1px solid var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 4px 20px rgba(0, 170, 255, 0.3);
}

.download-btn:hover {
    background: linear-gradient(135deg, rgba(0, 170, 255, 0.4), rgba(0, 170, 255, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 170, 255, 0.5);
}

.restart-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
}

.restart-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.download-btn i,
.restart-btn i {
    font-size: 2rem;
}

/* ==================== FOOTER ==================== */
.footer {
    padding: 4rem 10%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    z-index: 2;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    gap: 2rem;
}

.footer-content p {
    font-size: 1.4rem;
    color: var(--text-muted);
}

.footer-content span {
    color: var(--primary-color);
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 2.4rem;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.tech {
    color: var(--primary-color);
    font-weight: 600;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    html {
        font-size: 55%;
    }

    .nav-container {
        padding: 0 5%;
    }

    .main-title {
        font-size: 3.5rem;
    }

    .subtitle {
        font-size: 1.6rem;
    }

    .upload-card,
    .files-card,
    .processing-card,
    .success-card {
        padding: 2rem;
    }

    .upload-area {
        padding: 3rem 1.5rem;
    }

    .file-item {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .drag-handle {
        order: -1;
    }

    .file-info {
        flex: 1 1 100%;
        order: 1;
    }

    .file-number {
        order: 2;
    }

    .remove-btn {
        order: 3;
    }

    .action-buttons {
        flex-direction: column;
    }

    .add-more-btn,
    .merge-btn {
        width: 100%;
        justify-content: center;
    }

    .success-buttons {
        flex-direction: column;
    }

    .download-btn,
    .restart-btn {
        width: 100%;
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 50%;
    }

    .icon-wrapper {
        width: 80px;
        height: 80px;
        font-size: 4rem;
    }

    .main-title {
        font-size: 3rem;
    }

    .logo {
        font-size: 2rem;
    }

    .logo-bracket {
        font-size: 2.4rem;
    }
}
