/* StreamTools - Global Styles v2.0 */
/* Premium Design System */

:root {
    /* Primary Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.4);
    
    /* Secondary Colors */
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Neutrals */
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252542;
    --bg-input: #16162a;
    --border: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(255, 255, 255, 0.2);
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #06b6d4 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --gradient-premium: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    --gradient-bg: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16162a 100%);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--primary-glow);
    
    /* Spacing */
    --nav-height: 70px;
    --container-max: 1400px;
    --border-radius: 16px;
    --border-radius-sm: 10px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animation */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }

p { color: var(--text-secondary); }

a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(15, 15, 26, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(15, 15, 26, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-glow);
}

.nav-logo-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--primary-light);
    background: rgba(99, 102, 241, 0.1);
}

.nav-link-premium {
    background: var(--gradient-premium) !important;
    color: white !important;
    font-weight: 600;
    padding: 10px 20px;
}

.nav-link-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1001;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* Hamburger Animation */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 15, 26, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 30px;
        gap: 10px;
        transform: translateX(100%);
        transition: transform var(--transition-normal);
    }
    
    .nav-menu.open {
        transform: translateX(0);
    }
    
    .nav-link {
        width: 100%;
        padding: 15px 20px;
        font-size: 1.1rem;
    }
    
    /* Container Mobile */
    .container {
        padding: 0 16px;
    }
    
    /* Tool Grid Mobile */
    .tool-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Cards Mobile */
    .card {
        padding: 20px;
    }
    
    /* Tool Cards Mobile */
    .tool-card {
        padding: 20px;
    }
    
    .tool-card:hover {
        transform: translateY(-3px);
    }
    
    .tool-card-icon {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
        margin-bottom: 14px;
    }
    
    /* Buttons Mobile */
    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 30px 0;
        margin-top: 50px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 16px;
    }
    
    .footer-copy {
        padding-top: 16px;
        margin-top: 16px;
        font-size: 0.85rem;
    }
    
    /* Tool Page Mobile */
    .tool-page {
        padding-top: calc(var(--nav-height) + 20px);
        padding-bottom: 40px;
    }
    
    .tool-header {
        margin-bottom: 30px;
        padding: 0 16px;
    }
    
    .tool-header-icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
        margin-bottom: 16px;
    }
    
    .tool-header h1 {
        font-size: 1.5rem;
    }
    
    .tool-header p {
        font-size: 0.95rem;
    }
    
    .tool-container {
        padding: 0 16px;
    }
    
    .tool-section {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    /* Upload Area Mobile */
    .upload-area {
        padding: 30px 20px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
        margin-bottom: 14px;
    }
    
    .upload-text {
        font-size: 1rem;
    }
    
    .upload-hint {
        font-size: 0.85rem;
    }
    
    /* Info Box Mobile */
    .info-box {
        padding: 16px;
    }
    
    .info-box h3 {
        font-size: 1rem;
    }
    
    .info-box li {
        font-size: 0.9rem;
        padding: 8px 0 8px 24px;
    }
}

/* Main Content */
.main-content {
    padding-top: calc(var(--nav-height) + 40px);
    padding-bottom: 80px;
    min-height: 100vh;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 30px;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-glass {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px);
}

/* Tool Cards */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 28px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.tool-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.tool-card:hover::before {
    transform: scaleX(1);
}

.tool-card-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
}

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.tool-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    flex-grow: 1;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 16px;
    width: fit-content;
}

.tool-badge-free {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.tool-badge-premium {
    background: var(--gradient-premium);
    color: white;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--border-hover);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--border-radius);
    padding: 50px 30px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    background: rgba(99, 102, 241, 0.03);
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.upload-area.dragover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.12);
    transform: scale(1.01);
}

.upload-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.upload-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Progress */
.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width var(--transition-normal);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--warning);
}

/* Tool Page Layout */
.tool-page {
    padding-top: calc(var(--nav-height) + 30px);
    padding-bottom: 60px;
}

.tool-header {
    text-align: center;
    margin-bottom: 40px;
}

.tool-header-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 24px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.tool-header h1 {
    margin-bottom: 12px;
}

.tool-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.tool-container {
    max-width: 900px;
    margin: 0 auto;
}

.tool-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 24px;
}

.tool-section-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

/* Info Box */
.info-box {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--border-radius);
    padding: 24px;
}

.info-box h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--primary-light);
}

.info-box ul {
    list-style: none;
}

.info-box li {
    padding: 10px 0;
    padding-left: 28px;
    position: relative;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.info-box li:last-child {
    border-bottom: none;
}

.info-box li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* Footer */
.footer {
    background: rgba(15, 15, 26, 0.95);
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    gap: 24px;
}

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

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-copy {
    width: 100%;
    text-align: center;
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-legal {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.footer-legal a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-legal a:hover {
    color: var(--primary-light);
}

/* Utilities */
.text-center { text-align: center; }
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

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

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-card-hover);
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}
