/* ============================================================================
   MAGNIFIC KLING V3 - MODERN UI/UX
   Complete redesign with modern aesthetics and better UX
   ============================================================================ */

/* ============================================================================
   RESET & BASE STYLES
   ============================================================================ */

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

:root {
    /* Colors */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.hero {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: var(--space-2xl) var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-2xl);
    margin-bottom: var(--space-lg);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: white;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
}

/* ============================================================================
   MAIN CONTAINER
   ============================================================================ */

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-lg);
}

/* ============================================================================
   CARD COMPONENTS
   ============================================================================ */

.card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    margin-bottom: var(--space-xl);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.card-body {
    padding: var(--space-xl);
}

/* ============================================================================
   FORM ELEMENTS
   ============================================================================ */

.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.label-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.label-badge {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
}

.form-input,
.form-textarea,
.form-select,
.tiktok-input {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-base);
    background: white;
}

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

.form-textarea {
    resize: vertical;
    min-height: 100px;
    font-family: 'Courier New', monospace;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: var(--space-xs);
}

/* ============================================================================
   UPLOAD GRID
   ============================================================================ */

.upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

/* ============================================================================
   TAB NAVIGATION
   ============================================================================ */

.tab-nav {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    background: var(--gray-100);
    padding: 0.25rem;
    border-radius: var(--radius-lg);
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-base);
}

.tab-btn:hover {
    color: var(--gray-900);
}

.tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.tab-icon {
    font-size: 1rem;
}

.tab-text {
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================================================
   UPLOAD AREA
   ============================================================================ */

.upload-area {
    margin-bottom: var(--space-lg);
}

.upload-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--gray-50);
}

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

.upload-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
}

.upload-text {
    text-align: center;
}

.upload-title {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.upload-subtitle {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-500);
}/* ============================================================================
   TIKTOK INPUT
   ============================================================================ */

.tiktok-input-wrapper {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.tiktok-input {
    flex: 1;
}

.btn-tiktok {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-lg);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-tiktok:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-tiktok:active {
    transform: translateY(0);
}

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

.btn-icon {
    font-size: 1rem;
}

.btn-text {
    font-weight: 600;
}

/* ============================================================================
   PREVIEW GRID
   ============================================================================ */

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.preview-item {
    position: relative;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1;
    transition: transform var(--transition-base);
}

.preview-item:hover {
    transform: scale(1.02);
}

.preview-item img,
.preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.remove-btn {
    position: absolute;
    top: var(--space-xs);
    right: var(--space-xs);
    width: 28px;
    height: 28px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: var(--error);
    transform: scale(1.1);
}

/* TikTok Link */
.tiktok-link {
    margin-top: var(--space-xs);
    padding: var(--space-sm);
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-md);
    text-align: center;
}

.tiktok-link a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.75rem;
    word-break: break-all;
    transition: color var(--transition-base);
}

.tiktok-link a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================================================
   ACTION SECTION
   ============================================================================ */

.action-section {
    text-align: center;
    margin: var(--space-2xl) 0;
}

.btn-generate {
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-2xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-xl);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.btn-generate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-generate:active:not(:disabled) {
    transform: translateY(0);
}

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

.btn-arrow {
    font-size: 1.5rem;
    transition: transform var(--transition-base);
}

.btn-generate:hover:not(:disabled) .btn-arrow {
    transform: translateX(4px);
}

.action-hint {
    margin-top: var(--space-md);
    font-size: 0.875rem;
    color: white;
    opacity: 0.9;
}

/* ============================================================================
   PROGRESS SECTION
   ============================================================================ */

.progress-section,
.results-section {
    margin-top: var(--space-2xl);
}

.section-header {
    margin-bottom: var(--space-lg);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: white;
    text-align: center;
}

.progress-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.progress-item {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
}

.task-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.task-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
}

.task-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-md);
}

.status-processing {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transition: width var(--transition-slow);
}

/* ============================================================================
   RESULTS SECTION
   ============================================================================ */

.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.result-item {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.result-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.result-info {
    margin-bottom: var(--space-lg);
}

.result-info h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.result-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.result-actions {
    display: flex;
    gap: var(--space-sm);
}

.btn-preview,
.btn-download {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-preview {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-preview:hover {
    background: var(--gray-200);
}

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

.btn-download:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ============================================================================
   LOADING OVERLAY
   ============================================================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    margin-top: var(--space-lg);
    color: white;
    font-size: 1rem;
    font-weight: 600;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.footer {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    margin-top: var(--space-2xl);
}

.footer-text {
    color: white;
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

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

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

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.card,
.preview-item,
.result-item {
    animation: fadeIn 0.3s ease-out;
}

/* ============================================================================
   RESPONSIVE DESIGN - MOBILE FIRST & PROFESSIONAL
   ============================================================================ */

/* Tablet & Small Desktop (768px - 1024px) */
@media (max-width: 1024px) {
    .main-container {
        max-width: 100%;
        padding: var(--space-xl) var(--space-lg);
    }
    
    .upload-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

/* Tablet Portrait (768px and below) */
@media (max-width: 768px) {
    /* Hero Section - Mobile Optimized */
    .hero {
        padding: var(--space-xl) var(--space-lg);
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .logo {
        padding: var(--space-xs) var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    .logo-text {
        font-size: 1rem;
    }
    
    /* Main Container */
    .main-container {
        padding: var(--space-lg) var(--space-md);
    }
    
    /* Cards - Better Mobile Spacing */
    .card {
        margin-bottom: var(--space-lg);
        border-radius: var(--radius-lg);
    }
    
    .card-header,
    .card-body {
        padding: var(--space-lg);
    }
    
    .card-title {
        font-size: 1.375rem;
    }
    
    /* Form Elements - Touch Friendly */
    .form-input,
    .form-textarea,
    .form-select,
    .tiktok-input {
        padding: var(--space-md);
        font-size: 1rem;
        min-height: 48px; /* Touch target */
    }
    
    .form-textarea {
        min-height: 120px;
    }
    
    /* Upload Grid */
    .upload-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    /* Tab Navigation - Mobile Optimized */
    .tab-btn {
        padding: var(--space-md);
        font-size: 0.9375rem;
        min-height: 48px;
    }
    
    .tab-icon {
        font-size: 1.125rem;
    }
    
    /* Upload Area */
    .upload-trigger {
        padding: var(--space-xl);
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    /* Preview Grid - Better Mobile Layout */
    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: var(--space-md);
    }
    
    .preview-item {
        border-radius: var(--radius-md);
    }
    
    .remove-btn {
        width: 32px;
        height: 32px;
        font-size: 1.375rem;
    }
    
    /* TikTok Input - Stack on Mobile */
    .tiktok-input-wrapper {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .btn-tiktok {
        width: 100%;
        justify-content: center;
        min-height: 48px;
        padding: var(--space-md) var(--space-lg);
    }
    
    /* Generate Button - Full Width */
    .btn-generate {
        width: 100%;
        justify-content: center;
        padding: var(--space-lg) var(--space-xl);
        font-size: 1.0625rem;
    }
    
    .action-hint {
        font-size: 0.9375rem;
    }
    
    /* Progress Section */
    .section-title {
        font-size: 1.5rem;
    }
    
    .progress-item {
        padding: var(--space-md);
    }
    
    .task-name {
        font-size: 0.9375rem;
    }
    
    /* Results Grid */
    .results-container {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .result-item {
        padding: var(--space-md);
    }
    
    .btn-preview,
    .btn-download {
        padding: var(--space-md);
        font-size: 0.9375rem;
        min-height: 44px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    /* Hero - Compact Mobile */
    .hero {
        padding: var(--space-lg) var(--space-md);
    }
    
    .hero-title {
        font-size: 1.75rem;
        margin-bottom: var(--space-sm);
    }
    
    .hero-subtitle {
        font-size: 0.9375rem;
    }
    
    .logo {
        padding: 0.375rem var(--space-md);
        margin-bottom: var(--space-sm);
    }
    
    .logo-icon {
        font-size: 1.25rem;
    }
    
    .logo-text {
        font-size: 0.9375rem;
    }
    
    /* Main Container - Tighter Spacing */
    .main-container {
        padding: var(--space-md);
    }
    
    /* Cards - Compact */
    .card {
        margin-bottom: var(--space-md);
        border-radius: var(--radius-md);
    }
    
    .card-header,
    .card-body {
        padding: var(--space-md);
    }
    
    .card-title {
        font-size: 1.25rem;
    }
    
    .card-subtitle {
        font-size: 0.8125rem;
    }
    
    /* Form Elements - Larger Touch Targets */
    .form-input,
    .form-textarea,
    .form-select,
    .tiktok-input {
        padding: 0.875rem;
        font-size: 1rem;
        min-height: 50px;
    }
    
    .label-text {
        font-size: 0.9375rem;
    }
    
    .form-hint {
        font-size: 0.8125rem;
    }
    
    /* Tab Navigation - Compact */
    .tab-btn {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    .tab-text {
        display: none; /* Hide text, show icon only */
    }
    
    .tab-icon {
        font-size: 1.25rem;
    }
    
    /* Upload Area - Compact */
    .upload-trigger {
        padding: var(--space-lg);
    }
    
    .upload-icon {
        font-size: 2rem;
        margin-bottom: var(--space-sm);
    }
    
    .upload-title {
        font-size: 0.9375rem;
    }
    
    .upload-subtitle {
        font-size: 0.8125rem;
    }
    
    /* Preview Grid - 2 Columns */
    .preview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }
    
    .file-name {
        font-size: 0.6875rem;
        padding: 0.375rem;
    }
    
    .remove-btn {
        width: 28px;
        height: 28px;
        font-size: 1.25rem;
        top: 0.25rem;
        right: 0.25rem;
    }
    
    /* Buttons - Full Width & Touch Friendly */
    .btn-generate {
        font-size: 1rem;
        padding: var(--space-md) var(--space-lg);
        min-height: 52px;
    }
    
    .btn-arrow {
        font-size: 1.25rem;
    }
    
    .action-hint {
        font-size: 0.875rem;
        margin-top: var(--space-sm);
    }
    
    /* Progress & Results - Compact */
    .section-title {
        font-size: 1.375rem;
    }
    
    .progress-item,
    .result-item {
        padding: var(--space-sm) var(--space-md);
    }
    
    .task-name {
        font-size: 0.875rem;
    }
    
    .task-status {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.5rem;
    }
    
    .result-info h4 {
        font-size: 0.9375rem;
    }
    
    .result-info p {
        font-size: 0.8125rem;
    }
    
    .btn-preview,
    .btn-download {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    /* Public URL Button - Mobile Optimized */
    .btn-public-url {
        padding: var(--space-sm);
        font-size: 0.8125rem;
        min-height: 40px;
    }
    
    .btn-public-url .btn-icon {
        font-size: 0.9375rem;
    }
    
    /* Footer */
    .footer {
        padding: var(--space-lg) var(--space-md);
    }
    
    .footer-text {
        font-size: 0.8125rem;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    .preview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.375rem;
    }
    
    .btn-generate {
        font-size: 0.9375rem;
        padding: var(--space-sm) var(--space-md);
    }
}

/* ============================================================================
   UTILITY CLASSES
   ============================================================================ */

.text-center {
    text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

/* ============================================================================
   TIKTOK PUBLIC URL BUTTON
   ============================================================================ */

.tiktok-url-section {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.7));
}

.btn-public-url {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-public-url:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
}

.btn-public-url:active {
    transform: translateY(0);
}

.btn-public-url .btn-icon {
    font-size: 1rem;
}

.btn-public-url .btn-text {
    font-weight: 600;
}

/* ============================================================================
   PROFESSIONAL ENHANCEMENTS
   ============================================================================ */

/* Enhanced Shadows & Depth */
.card {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.1);
}

/* Professional Focus States */
.form-input:focus,
.form-textarea:focus,
.form-select:focus,
.tiktok-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Enhanced Button States */
.btn-generate,
.btn-tiktok,
.btn-preview,
.btn-download,
.btn-public-url {
    position: relative;
    overflow: hidden;
}

.btn-generate::before,
.btn-tiktok::before,
.btn-download::before,
.btn-public-url::before {
    content: " \;
 position: absolute;
 top: 50%;
 left: 50%;
 width: 0;
 height: 0;
 border-radius: 50%;
 background: rgba(255, 255, 255, 0.2);
 transform: translate(-50%, -50%);
 transition: width 0.6s, height 0.6s;
}

.btn-generate:active::before,
.btn-tiktok:active::before,
.btn-download:active::before,
.btn-public-url:active::before {
 width: 300px;
 height: 300px;
}

/* Professional Upload Area */
.upload-trigger {
 position: relative;
 overflow: hidden;
}

.upload-trigger::after {
 content: \\;
 position: absolute;
 top: -50%;
 left: -50%;
 width: 200%;
 height: 200%;
 background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
 opacity: 0;
 transition: opacity 0.3s;
}

.upload-trigger:hover::after {
 opacity: 1;
}

/* Professional Card Hover */
.result-item,
.progress-item {
 border: 1px solid rgba(0, 0, 0, 0.05);
 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-item:hover {
 border-color: rgba(99, 102, 241, 0.2);
}

/* Enhanced Preview Items */
.preview-item {
 box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
 border: 2px solid transparent;
 transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-item:hover {
 border-color: var(--primary-light);
 box-shadow: 0 8px 16px rgba(99, 102, 241, 0.2);
}

/* Professional Loading Overlay */
.loading-overlay {
 backdrop-filter: blur(8px);
}

.loading-spinner {
 box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Enhanced Tab Navigation */
.tab-btn {
 position: relative;
}

.tab-btn::after {
 content: \\;
 position: absolute;
 bottom: 0;
 left: 50%;
 width: 0;
 height: 2px;
 background: var(--primary);
 transform: translateX(-50%);
 transition: width 0.3s;
}

.tab-btn.active::after {
 width: 80%;
}

/* Professional Progress Bar */
.progress-bar {
 box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
 box-shadow: 0 1px 3px rgba(99, 102, 241, 0.3);
}

/* Enhanced Status Badges */
.task-status {
 text-transform: uppercase;
 letter-spacing: 0.5px;
 font-size: 0.6875rem;
}

.status-processing {
 animation: pulse 2s ease-in-out infinite;
}

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

/* Professional Remove Button */
.remove-btn {
 backdrop-filter: blur(4px);
 box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.remove-btn:hover {
 box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

/* Enhanced Hero Section */
.hero {
 position: relative;
 overflow: hidden;
}

.hero::before {
 content: \\;
 position: absolute;
 top: 0;
 left: 0;
 right: 0;
 bottom: 0;
 background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
 pointer-events: none;
}

.logo {
 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Professional Footer */
.footer {
 position: relative;
}

.footer::before {
 content: \\;
 position: absolute;
 top: 0;
 left: 50%;
 transform: translateX(-50%);
 width: 100px;
 height: 2px;
 background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* Smooth Scroll Behavior */
html {
 scroll-behavior: smooth;
}

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

::-moz-selection {
 background: var(--primary-light);
 color: white;
}

/* Professional Scrollbar (Webkit) */
::-webkit-scrollbar {
 width: 10px;
 height: 10px;
}

::-webkit-scrollbar-track {
 background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
 background: var(--gray-400);
 border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
 background: var(--gray-500);
}

/* Enhanced Accessibility */
.btn-generate:focus-visible,
.btn-tiktok:focus-visible,
.btn-preview:focus-visible,
.btn-download:focus-visible,
.btn-public-url:focus-visible,
.tab-btn:focus-visible,
.remove-btn:focus-visible {
 outline: 3px solid var(--primary-light);
 outline-offset: 2px;
}

/* Professional Disabled State */
.btn-generate:disabled,
.btn-tiktok:disabled {
 background: var(--gray-300);
 cursor: not-allowed;
 box-shadow: none;
}

/* Enhanced Card Animations */
@keyframes cardEnter {
 from {
 opacity: 0;
 transform: translateY(20px) scale(0.95);
 }
 to {
 opacity: 1;
 transform: translateY(0) scale(1);
 }
}

.card {
 animation: cardEnter 0.4s ease-out;
}

/* Professional Loading State */
@keyframes shimmer {
 0% {
 background-position: -1000px 0;
 }
 100% {
 background-position: 1000px 0;
 }
}

.loading-shimmer {
 background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
 background-size: 1000px 100%;
 animation: shimmer 2s infinite;
}
