/* ===================================
   VidShare — CSS Styles
   Inspired by MyVIOO.io design
   =================================== */

:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    
    --text-white: #ffffff;
    --text-light: #e2e8f0;
    --text-muted: #94a3b8;
    --text-dark: #64748b;
    
    --border: #334155;
    --border-light: #475569;
    
    --success: #10b981;
    --error: #ef4444;
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --gradient-hero: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e293b 100%);
    
    /* Typography */
    --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing */
    --container-max: 1200px;
    --section-padding: 100px;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-darker);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* ===================================
   Header
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-white);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

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

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-white);
}

.nav-btn {
    padding: 10px 24px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 40% 80%, rgba(14, 165, 233, 0.1) 0%, transparent 40%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-white);
}

.hero-title .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--border-light);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-white);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Floating Cards */
.hero-image {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    z-index: 1;
}

.floating-card {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

.floating-card .card-icon {
    font-size: 1.5rem;
}

.floating-card .card-title {
    display: block;
    font-weight: 600;
    color: var(--text-white);
    font-size: 0.95rem;
}

.floating-card .card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.card-1 {
    top: 10%;
    right: 20%;
    animation-delay: 0s;
}

.card-2 {
    top: 45%;
    right: 5%;
    animation-delay: -2s;
}

.card-3 {
    bottom: 15%;
    right: 25%;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* ===================================
   Sections Common
   =================================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.2;
}

/* ===================================
   Features Section
   =================================== */
.features {
    padding: var(--section-padding) 0;
    background: var(--bg-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 12px;
}

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

/* ===================================
   How it Works
   =================================== */
.how-it-works {
    padding: var(--section-padding) 0;
    background: var(--bg-darker);
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    max-width: 200px;
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.step h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 8px;
}

.step p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.step-arrow {
    color: var(--border-light);
}

/* ===================================
   Upload Section
   =================================== */
.upload-section {
    padding: var(--section-padding) 0;
    background: var(--bg-dark);
}

.upload-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.upload-info h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-white);
    margin: 16px 0;
}

.upload-info > p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.upload-features {
    list-style: none;
}

.upload-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-light);
}

.upload-features svg {
    color: var(--success);
    flex-shrink: 0;
}

/* Upload Card */
.upload-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 40px;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
}

.form-group input[type="text"] {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-size: 1rem;
    color: var(--text-white);
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-group input[type="text"]::placeholder {
    color: var(--text-dark);
}

/* Drop Zone */
.drop-zone {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-darker);
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.drop-zone-content {
    pointer-events: none;
}

.drop-icon {
    color: var(--primary);
    margin-bottom: 16px;
}

.drop-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 8px;
}

.drop-subtext {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.browse-link {
    color: var(--primary-light);
    text-decoration: underline;
}

.file-info {
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-top: 12px;
}

/* File Preview */
.file-preview {
    display: none;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    padding: 16px;
    border-radius: var(--radius-sm);
    pointer-events: auto;
}

.file-preview.active {
    display: flex;
}

.preview-icon {
    font-size: 2rem;
}

.preview-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preview-name {
    font-weight: 500;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-size {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.remove-file {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    z-index: 10;
}

.remove-file:hover {
    background: var(--error);
    color: white;
}

/* Progress */
.progress-container {
    display: none;
    background: var(--bg-darker);
    border-radius: var(--radius-sm);
    padding: 20px;
}

.progress-container.active {
    display: block;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.progress-label {
    font-weight: 500;
    color: var(--text-light);
}

.progress-percent {
    font-weight: 600;
    color: var(--primary-light);
}

.progress-bar {
    height: 8px;
    background: var(--bg-card);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-status {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Error Message */
.error-message {
    display: none;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    color: var(--error);
    font-size: 0.95rem;
}

.error-message.active {
    display: block;
}

/* Upload Button */
.upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.upload-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4);
}

.upload-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===================================
   Result Section
   =================================== */
.result-section {
    display: none;
    padding: var(--section-padding) 0;
    background: var(--bg-dark);
    min-height: 80vh;
    align-items: center;
}

.result-section.active {
    display: flex;
}

.result-card {
    max-width: 500px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin: 0 auto 24px;
    animation: scaleIn 0.5s ease;
}

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

.result-card h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 8px;
}

.result-card > p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.share-link-container {
    text-align: left;
    margin-bottom: 32px;
}

.share-link-container label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.share-link-box {
    display: flex;
    gap: 8px;
}

.share-link-input {
    flex: 1;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 0.9rem;
    color: var(--text-light);
    font-family: var(--font-main);
}

.copy-btn {
    padding: 14px 24px;
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    font-family: var(--font-main);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--bg-card-hover);
}

.copy-btn .copied-text {
    display: none;
}

.copy-btn.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.copy-btn.copied .copy-text {
    display: none;
}

.copy-btn.copied .copied-text {
    display: inline;
}

.result-actions {
    display: flex;
    gap: 12px;
}

.result-actions .btn {
    flex: 1;
    justify-content: center;
}

/* ===================================
   Footer
   =================================== */
.footer {
    padding: 60px 0 30px;
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand p {
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 16px;
}

.footer-links a,
.footer-links span {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 10px;
    transition: var(--transition);
}

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

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* ===================================
   Responsive
   =================================== */
@media (max-width: 1024px) {
    .hero-image {
        display: none;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
    }
    
    .hero-subtitle {
        margin: 0 auto 40px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }
    
    .nav {
        display: none;
    }
    
    .upload-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .upload-info {
        text-align: center;
    }
    
    .upload-features {
        display: inline-block;
        text-align: left;
    }
    
    .steps {
        flex-direction: column;
    }
    
    .step-arrow {
        transform: rotate(90deg);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer-brand p {
        margin: 0 auto;
    }
    
    .result-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .stat-divider {
        width: 40px;
        height: 1px;
    }
    
    .upload-card {
        padding: 24px;
    }
    
    .share-link-box {
        flex-direction: column;
    }
}