/**
 * Hero Upload Component Styles
 * Modern, unified upload interface for images, videos, and URLs
 * Inspired by: Imgur, Streamable, Giphy, Gfycat
 */

/* ============================================================================
   HERO UPLOAD SECTION
   ============================================================================ */

.upload-hero {
    background: var(--bg-secondary);
    padding: 2rem 0 3rem;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.upload-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(217, 70, 239, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Dark mode specific */
[data-theme="dark"] .upload-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

[data-theme="dark"] .upload-hero::before {
    background:
        radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(217, 70, 239, 0.15) 0%, transparent 50%);
}

.upload-hero-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.upload-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #a855f7, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-hero-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

/* Upload Method Tabs */
.upload-method-tabs {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.upload-method-tab {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.upload-method-tab i {
    font-size: 1.5rem;
}

.upload-method-tab:hover {
    background: var(--bg-secondary);
    border-color: rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

.upload-method-tab.active {
    background: linear-gradient(135deg, #a855f7, #d946ef);
    border-color: #a855f7;
    color: white;
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.3);
}

/* Dark mode specific */
[data-theme="dark"] .upload-method-tab {
    background: rgba(255, 255, 255, 0.05);
    border-color: transparent;
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .upload-method-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(168, 85, 247, 0.3);
}

/* Upload Card */
.upload-hero-card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Dark mode specific */
[data-theme="dark"] .upload-hero-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Upload Content Sections */
.upload-content-section {
    display: none;
    width: 100%;
}

.upload-content-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
    width: 100%;
}

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

/* Dropzone Styles */
.hero-dropzone {
    border: 3px dashed rgba(168, 85, 247, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(168, 85, 247, 0.05);
    cursor: pointer;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

[data-theme="light"] .hero-dropzone {
    background: rgba(248, 250, 252, 0.5);
    border-color: rgba(168, 85, 247, 0.25);
}

.dropzone-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.hero-dropzone:hover {
    border-color: #a855f7;
    background: rgba(168, 85, 247, 0.1);
    transform: scale(1.01);
}

.hero-dropzone.dragover {
    border-color: #d946ef;
    background: rgba(217, 70, 239, 0.15);
    transform: scale(1.02);
}

.hero-dropzone-icon {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #a855f7, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.hero-dropzone-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.hero-dropzone-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.hero-dropzone-btn {
    background: linear-gradient(135deg, #a855f7, #d946ef);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-dropzone-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
}

.hero-dropzone-hint {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* URL Input Section */
.hero-url-input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.hero-url-input {
    flex: 1;
    background: var(--bg-primary);
    border: 2px solid rgba(168, 85, 247, 0.3);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

[data-theme="dark"] .hero-url-input {
    background: rgba(255, 255, 255, 0.05);
}

.hero-url-input:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
}

[data-theme="dark"] .hero-url-input:focus {
    background: rgba(255, 255, 255, 0.08);
}

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

.hero-fetch-btn {
    background: linear-gradient(135deg, #a855f7, #d946ef);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.hero-fetch-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
}

.hero-fetch-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* URL Examples */
.url-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
    align-items: center;
}

.url-example-tag {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 50%;
    font-size: 1.25rem;
    color: #a855f7;
    cursor: default;
    transition: none;
}

[data-theme="light"] .url-example-tag {
    background: rgba(168, 85, 247, 0.06);
}

.url-example-tag i {
    color: #a855f7;
}

/* Preview Section */
.hero-preview-container {
    display: none;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    animation: fadeIn 0.3s ease;
}

.hero-preview-container.show {
    display: block;
}

.hero-preview-media {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    max-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .hero-preview-media {
    background: rgba(0, 0, 0, 0.3);
}

.hero-preview-media img,
.hero-preview-media video {
    max-width: 100%;
    max-height: 400px;
    display: block;
}

.hero-preview-remove {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-preview-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Upload Form */
.hero-upload-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hero-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hero-form-label {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.hero-form-input,
.hero-form-textarea,
.hero-form-select {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

[data-theme="dark"] .hero-form-input,
[data-theme="dark"] .hero-form-textarea,
[data-theme="dark"] .hero-form-select {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.hero-form-input:focus,
.hero-form-textarea:focus,
.hero-form-select:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

[data-theme="dark"] .hero-form-input:focus,
[data-theme="dark"] .hero-form-textarea:focus,
[data-theme="dark"] .hero-form-select:focus {
    background: rgba(255, 255, 255, 0.08);
}

/* Hero form select option styling for proper contrast */
.hero-form-select option {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 10px;
}

[data-theme="light"] .hero-form-select option {
    background: #ffffff;
    color: #0f172a;
}

[data-theme="dark"] .hero-form-select option {
    background: #1e293b;
    color: #f1f5f9;
}

.hero-form-textarea {
    resize: vertical;
    min-height: 80px;
}

.hero-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Upload Button */
.hero-upload-btn {
    background: linear-gradient(135deg, #a855f7, #d946ef);
    color: white;
    border: none;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
    width: 100%;
}

.hero-upload-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(168, 85, 247, 0.4);
}

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

.hero-upload-btn.success {
    background: linear-gradient(135deg, #10b981, #059669);
    animation: successPulse 0.6s ease;
}

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

/* Progress Bar */
.hero-upload-progress {
    display: none;
    margin-top: 1.5rem;
}

.hero-upload-progress.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

.hero-progress-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

[data-theme="dark"] .hero-progress-bar {
    background: rgba(255, 255, 255, 0.1);
    border: none;
}

.hero-progress-fill {
    background: linear-gradient(90deg, #a855f7, #d946ef);
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.6);
}

.hero-progress-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Messages */
.hero-message {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-top: 1.5rem;
    display: none;
    align-items: center;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease;
}

.hero-message.show {
    display: flex;
}

.hero-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

[data-theme="dark"] .hero-message.error {
    color: #fca5a5;
}

.hero-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid rgba(34, 197, 94, 0.3);
    color: #16a34a;
}

[data-theme="dark"] .hero-message.success {
    color: #86efac;
}

.hero-message i {
    font-size: 1.5rem;
}

/* Features Below Hero */
.upload-hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.upload-hero-feature {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.upload-hero-feature:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-5px);
    border-color: rgba(168, 85, 247, 0.3);
}

.upload-hero-feature i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #a855f7, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.upload-hero-feature h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.upload-hero-feature p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Dashboard Stats Below Hero */
.upload-hero + .section {
    padding-top: 3rem;
}

.upload-hero + .section .section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.dashboard-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.dashboard-stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.dashboard-stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(168, 85, 247, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.dashboard-stat-card i {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #a855f7, #d946ef);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .upload-hero {
        padding: 1.5rem 0 2rem;
    }

    .upload-hero-title {
        font-size: 1.5rem;
    }

    .upload-hero-subtitle {
        font-size: 0.875rem;
    }

    .upload-method-tabs {
        flex-direction: row;
        gap: 0.5rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .upload-method-tabs::-webkit-scrollbar {
        display: none;
    }

    .upload-method-tab {
        padding: 0.75rem 1rem;
        flex-shrink: 0;
        font-size: 0.9rem;
        flex: 1;
        justify-content: center;
    }

    .upload-method-tab i {
        font-size: 1.25rem;
    }

    .upload-method-tab span {
        display: none;
    }

    .upload-hero-card {
        padding: 1rem;
    }

    .hero-dropzone {
        padding: 1rem;
    }

    .hero-dropzone-icon {
        font-size: 2rem;
    }

    .hero-url-input-container {
        flex-direction: column;
    }

    .hero-form-row {
        grid-template-columns: 1fr;
    }

    .upload-hero-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Loading State */
.hero-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--text-secondary);
}

.hero-loading i {
    font-size: 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success Animation Overlay */
.upload-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    animation: fadeInOverlay 0.3s ease forwards;
}

@keyframes fadeInOverlay {
    to { opacity: 1; }
}

.upload-success-content {
    text-align: center;
    color: white;
    animation: zoomIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.upload-success-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: successBounce 0.6s ease;
}

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

.upload-success-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    opacity: 0.3;
    animation: successRipple 1s ease-out infinite;
}

@keyframes successRipple {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.upload-success-icon i {
    font-size: 4rem;
    color: white;
    animation: checkmarkDraw 0.4s ease 0.2s backwards;
}

@keyframes checkmarkDraw {
    from {
        transform: scale(0) rotate(45deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.upload-success-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #10b981, #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-success-message {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.upload-success-redirect {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Confetti particles */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #a855f7;
    animation: confettiFall 3s linear infinite;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.confetti:nth-child(1) { left: 10%; animation-delay: 0s; background: #a855f7; }
.confetti:nth-child(2) { left: 20%; animation-delay: 0.2s; background: #d946ef; }
.confetti:nth-child(3) { left: 30%; animation-delay: 0.4s; background: #10b981; }
.confetti:nth-child(4) { left: 40%; animation-delay: 0.6s; background: #3b82f6; }
.confetti:nth-child(5) { left: 50%; animation-delay: 0.8s; background: #f59e0b; }
.confetti:nth-child(6) { left: 60%; animation-delay: 1s; background: #ef4444; }
.confetti:nth-child(7) { left: 70%; animation-delay: 1.2s; background: #8b5cf6; }
.confetti:nth-child(8) { left: 80%; animation-delay: 1.4s; background: #ec4899; }
.confetti:nth-child(9) { left: 90%; animation-delay: 1.6s; background: #14b8a6; }
.confetti:nth-child(10) { left: 15%; animation-delay: 1.8s; background: #f97316; }
