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

:root {
    --neon-pink: #ff00ff;
    --neon-cyan: #00ffff;
    --neon-purple: #9d00ff;
    --dark-bg: #0a0a0f;
    --darker-bg: #050508;
    --grid-color: rgba(157, 0, 255, 0.2);
}

body {
    font-family: 'Courier New', monospace;
    background: var(--dark-bg);
    color: var(--neon-cyan);
    overflow-x: hidden;
    min-height: 100vh;
}

.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 9999;
}

.grid-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: -1px -1px;
    pointer-events: none;
    z-index: -1;
}

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: flex;
    flex-direction: column;
}

#auth-screen {
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.glitch-container {
    margin-bottom: 40px;
    text-align: center;
}

.glitch {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    color: var(--neon-cyan);
    text-shadow: 
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 40px var(--neon-cyan);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 
            0 0 10px var(--neon-cyan),
            0 0 20px var(--neon-cyan),
            0 0 40px var(--neon-cyan);
    }
    to {
        text-shadow: 
            0 0 20px var(--neon-cyan),
            0 0 40px var(--neon-cyan),
            0 0 80px var(--neon-cyan),
            0 0 100px var(--neon-pink);
    }
}

.auth-box {
    position: relative;
    background: rgba(10, 10, 15, 0.8);
    border: 2px solid var(--neon-purple);
    padding: 40px;
    width: 400px;
    max-width: 90%;
    box-shadow: 
        0 0 20px var(--neon-purple),
        inset 0 0 20px rgba(157, 0, 255, 0.1);
}

.neon-border {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--neon-pink), var(--neon-cyan), var(--neon-purple));
    z-index: -1;
    filter: blur(10px);
    opacity: 0.5;
    animation: rotate-border 4s linear infinite;
}

@keyframes rotate-border {
    0% { filter: blur(10px) hue-rotate(0deg); }
    100% { filter: blur(10px) hue-rotate(360deg); }
}

input[type="password"],
input[type="text"],
input[type="number"] {
    width: 100%;
    padding: 15px;
    background: var(--darker-bg);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    margin-bottom: 20px;
    outline: none;
    transition: all 0.3s;
}

input[type="password"]:focus,
input[type="text"]:focus,
input[type="number"]:focus {
    border-color: var(--neon-pink);
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
}

.checkbox {
    width: auto;
    margin: 0;
    margin-right: 10px;
    accent-color: var(--neon-cyan);
}

.cyber-btn {
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--neon-cyan), transparent);
    transition: left 0.5s;
}

.cyber-btn:hover {
    color: var(--dark-bg);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.cyber-btn:hover::before {
    left: 100%;
}

.cyber-btn span {
    position: relative;
    z-index: 1;
}

.error-msg {
    color: var(--neon-pink);
    text-align: center;
    margin-top: 10px;
    min-height: 20px;
    text-shadow: 0 0 10px var(--neon-pink);
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 20px;
    border-bottom: 2px solid var(--neon-purple);
    background: rgba(5, 5, 8, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    font-size: 2rem;
    margin: 0;
}

.status-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    background: var(--neon-cyan);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 10px var(--neon-cyan);
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.icon-btn {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: var(--neon-cyan);
    color: var(--dark-bg);
    box-shadow: 0 0 20px var(--neon-cyan);
}

.icon-btn svg {
    width: 20px;
    height: 20px;
}

.mobile-menu-btn {
    display: none;
}

.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 300px;
    background: rgba(5, 5, 8, 0.8);
    border-right: 1px solid var(--neon-purple);
    padding: 20px;
    overflow-y: auto;
    transition: transform 0.3s;
}

.sidebar h3 {
    color: var(--neon-pink);
    margin-bottom: 15px;
    font-size: 1rem;
    text-shadow: 0 0 10px var(--neon-pink);
}

.stats-panel,
.controls-panel {
    margin-bottom: 30px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.stat-label {
    color: var(--neon-cyan);
    opacity: 0.8;
}

.stat-value {
    color: var(--neon-pink);
    font-weight: bold;
}

.control-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--neon-purple);
    color: var(--neon-cyan);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.control-btn:hover {
    background: var(--neon-purple);
    color: var(--dark-bg);
    box-shadow: 0 0 15px var(--neon-purple);
}

.control-btn svg {
    width: 16px;
    height: 16px;
}

.content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.upload-container {
    max-width: 1200px;
    margin: 0 auto;
}

.drop-zone {
    position: relative;
    border: 3px dashed var(--neon-purple);
    background: rgba(10, 10, 15, 0.6);
    padding: 60px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 30px;
    overflow: hidden;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.05);
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 0 30px rgba(0, 255, 255, 0.1);
}

.cyber-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255, 0, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 0, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: var(--neon-cyan);
    filter: drop-shadow(0 0 10px var(--neon-cyan));
}

.drop-zone h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 10px;
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
}

.drop-zone p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    opacity: 0.8;
}

.browse-text-mobile,
.drop-text-mobile {
    display: none;
}

@media (max-width: 768px), (pointer: coarse) {
    .browse-text-desktop,
    .drop-text-desktop,
    .drop-hint-unlimited {
        display: none;
    }

    .browse-text-mobile,
    .drop-text-mobile {
        display: block;
    }
}

.drop-hint {
    margin-top: 15px;
    font-size: 0.85rem !important;
    color: var(--neon-purple) !important;
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(5, 5, 8, 0.6);
    border: 1px solid var(--neon-purple);
}

.files-header h3 {
    color: var(--neon-cyan);
    font-size: 1.2rem;
}

.queue-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
}

.queue-stats span {
    color: var(--neon-pink);
}

.files-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-item {
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid var(--neon-purple);
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.file-item:hover {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.file-name {
    font-size: 1.1rem;
    color: var(--neon-cyan);
    font-weight: bold;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.file-size {
    color: var(--neon-purple);
    font-size: 0.9rem;
    white-space: nowrap;
}

.file-controls {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.file-control-btn {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.file-control-btn:hover {
    background: var(--neon-cyan);
    color: var(--dark-bg);
}

.file-control-btn svg {
    width: 14px;
    height: 14px;
}

.file-status {
    font-size: 0.85rem;
    margin-bottom: 10px;
    color: var(--neon-pink);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.file-speed {
    color: var(--neon-cyan);
}

.progress-bar-container {
    height: 8px;
    background: var(--darker-bg);
    border: 1px solid var(--neon-purple);
    position: relative;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-purple), var(--neon-cyan));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--neon-cyan);
}

.file-item.completed {
    border-color: var(--neon-cyan);
    background: rgba(0, 255, 255, 0.05);
}

.file-item.completed .file-name {
    color: var(--neon-cyan);
}

.file-item.error {
    border-color: var(--neon-pink);
    background: rgba(255, 0, 255, 0.05);
}

.file-item.error .file-status {
    color: var(--neon-pink);
}

.file-item.paused {
    opacity: 0.6;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--dark-bg);
    border: 2px solid var(--neon-purple);
    width: 600px;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 40px var(--neon-purple);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--neon-purple);
}

.modal-header h2 {
    color: var(--neon-cyan);
    font-size: 1.5rem;
}

.close-btn {
    background: transparent;
    border: none;
    color: var(--neon-pink);
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 20px var(--neon-cyan);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--neon-purple);
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    color: var(--neon-pink);
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-shadow: 0 0 10px var(--neon-pink);
}

.setting-item {
    margin-bottom: 20px;
}

.setting-item label {
    display: block;
    color: var(--neon-cyan);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.setting-hint {
    display: block;
    color: var(--neon-purple);
    font-size: 0.75rem;
    margin-top: 5px;
    opacity: 0.8;
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 70px;
        height: calc(100vh - 70px);
        z-index: 99;
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .content {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header {
        flex-wrap: wrap;
        padding: 15px;
    }
    
    .sidebar {
        top: 120px;
        height: calc(100vh - 120px);
    }
    
    .header-left {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .status-text {
        display: none;
    }
    
    .glitch {
        font-size: 2rem;
    }
    
    .drop-zone {
        padding: 40px 20px;
    }
    
    .upload-icon {
        width: 60px;
        height: 60px;
    }
    
    .files-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .queue-stats {
        width: 100%;
        justify-content: space-between;
    }
    
    .file-item {
        padding: 15px;
    }
    
    .file-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .file-controls {
        width: 100%;
        justify-content: flex-end;
    }
    
    .modal-content {
        max-height: 100vh;
        height: 100%;
    }
    
    .sidebar {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 30px 20px;
    }
    
    input[type="password"],
    input[type="text"],
    input[type="number"] {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .cyber-btn {
        padding: 12px;
        font-size: 1rem;
    }
    
    .content {
        padding: 15px;
    }
    
    .drop-zone h2 {
        font-size: 1.3rem;
    }
    
    .drop-zone p {
        font-size: 0.85rem;
    }
    
    .file-name {
        font-size: 1rem;
    }
    
    .file-size {
        font-size: 0.8rem;
    }
    
    .stat-item,
    .file-status {
        font-size: 0.8rem;
    }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--neon-purple);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
}
