/* ZapUpload Theme - Main Stylesheet */
/* Electric Cyan & Golden Orange Theme with Dark/Light Mode Support */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* CSS Variables will be injected from colors.css */

/* Global Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: all 0.3s ease;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--electric-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--electric-cyan-hover);
    text-decoration: none;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--electric-cyan), var(--electric-cyan-dark));
    color: var(--text-primary);
    box-shadow: 0 4px 15px rgba(0, 217, 255, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--electric-cyan-hover), var(--electric-cyan));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 217, 255, 0.4);
    color: var(--text-primary);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--golden-orange), var(--golden-orange-dark));
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--golden-orange-hover), var(--golden-orange));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 167, 38, 0.4);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--electric-cyan);
    color: var(--electric-cyan);
}

.btn-outline:hover {
    background: var(--electric-cyan);
    color: var(--bg-primary);
}

.btn-ghost {
    background: rgba(0, 217, 255, 0.1);
    color: var(--electric-cyan);
    border: 1px solid rgba(0, 217, 255, 0.2);
}

.btn-ghost:hover {
    background: rgba(0, 217, 255, 0.2);
    border-color: var(--electric-cyan);
}

/* Card Styles */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--electric-cyan), var(--golden-orange));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card:hover:before {
    opacity: 1;
}

/* Navigation Styles */
.navbar {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav .nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

[data-theme="light"] .navbar-nav .nav-link {
    color: #2D3748;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--electric-cyan);
    background: rgba(0, 217, 255, 0.1);
}

[data-theme="light"] .navbar-nav .nav-link:hover,
[data-theme="light"] .navbar-nav .nav-link.active {
    color: #00BCD4;
    background: rgba(0, 188, 212, 0.08);
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--electric-cyan), var(--golden-orange));
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 217, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: 0 12px 35px rgba(0, 217, 255, 0.4);
}

/* Lightning Animation Effects */
@keyframes lightning {
    0%, 100% { opacity: 0; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.lightning-effect {
    position: relative;
    overflow: hidden;
}

.lightning-effect:before {
    content: '⚡';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--golden-orange);
    opacity: 0;
    animation: lightning 2s infinite;
    pointer-events: none;
}

/* File Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.upload-area:hover {
    border-color: var(--electric-cyan);
    background: rgba(0, 217, 255, 0.05);
}

.upload-area.drag-over {
    border-color: var(--golden-orange);
    background: rgba(255, 167, 38, 0.05);
    transform: scale(1.02);
}

/* Progress Bars */
.progress {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    background: linear-gradient(90deg, var(--electric-cyan), var(--golden-orange));
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 33%, rgba(255, 255, 255, 0.3) 33%, rgba(255, 255, 255, 0.3) 66%, transparent 66%);
    background-size: 30px 30px;
    animation: progress-shine 1s linear infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-30px); }
    100% { transform: translateX(100vw); }
}

/* Form Styles */
.form-control {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--electric-cyan);
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.1);
    background: var(--bg-card);
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Alerts and Notifications */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-warning {
    background: rgba(255, 152, 0, 0.1);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.alert-danger {
    background: rgba(244, 67, 54, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.alert-info {
    background: rgba(0, 188, 212, 0.1);
    color: var(--info-color);
    border-left: 4px solid var(--info-color);
}

/* Footer Styles */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

[data-theme="light"] .footer {
    background: #F8FAFB;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-links a {
    color: var(--text-secondary);
    transition: color 0.3s ease;
    font-weight: 500;
}

[data-theme="light"] .footer-links a {
    color: #2D3748;
}

.footer-links a:hover {
    color: var(--electric-cyan);
}

[data-theme="light"] .footer-links a:hover {
    color: #00BCD4;
}

/* Footer headings in light theme */
[data-theme="light"] .footer h5,
[data-theme="light"] .footer h6,
[data-theme="light"] .footer .footer-title {
    color: #1A202C;
    font-weight: 700;
}

/* Footer text in light theme */
[data-theme="light"] .footer p,
[data-theme="light"] .footer small,
[data-theme="light"] .footer .text-muted {
    color: #4A5568;
}

/* Responsive Design */
@media (max-width: 768px) {
    .theme-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    .card {
        padding: 1rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.preloader-logo {
    font-size: 3rem;
    font-weight: 700;
    color: var(--electric-cyan);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--electric-cyan), var(--golden-orange));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--golden-orange), var(--electric-cyan));
}

/* Utility Classes */
.text-electric { color: var(--electric-cyan) !important; }
.text-golden { color: var(--golden-orange) !important; }
.bg-electric { background-color: var(--electric-cyan) !important; }
.bg-golden { background-color: var(--golden-orange) !important; }
.border-electric { border-color: var(--electric-cyan) !important; }
.border-golden { border-color: var(--golden-orange) !important; }

.gradient-text {
    background: linear-gradient(135deg, var(--electric-cyan), var(--golden-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.gradient-border {
    position: relative;
    background: var(--bg-card);
    border-radius: 1rem;
}

.gradient-border:before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, var(--electric-cyan), var(--golden-orange));
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}