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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #8b5cf6;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --bg-color: #0a0e27;
    --bg-card: rgba(30, 41, 59, 0.6);
    --bg-hover: rgba(51, 65, 85, 0.8);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --border-color: rgba(148, 163, 184, 0.2);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.3);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    --gradient-bg: linear-gradient(135deg, #0a0e27 0%, #1e1b4b 50%, #312e81 100%);
    --gradient-card: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(51, 65, 85, 0.6) 100%);
}

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

/* Animated background particles */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    animation: backgroundShift 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 1;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInDown 0.8s ease-out;
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.logo-icon {
    width: 80px;
    height: 80px;
    position: relative;
    animation: logoFloat 3s ease-in-out infinite;
}

.logo-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 20px rgba(99, 102, 241, 0.4));
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

@keyframes logoPulse {
    0%, 100% {
        filter: drop-shadow(0 8px 20px rgba(99, 102, 241, 0.4));
    }
    50% {
        filter: drop-shadow(0 12px 30px rgba(99, 102, 241, 0.6));
    }
}

.logo {
    font-size: 4rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -0.03em;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.logo-text-main {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    animation: textShine 3s ease-in-out infinite;
}

.logo-text-clipper {
    background: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    font-weight: 800;
    animation: textShine 3s ease-in-out infinite 0.5s;
}

@keyframes textShine {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 5px;
    background: var(--gradient-primary);
    border-radius: 3px;
    opacity: 0.6;
    animation: underlineGrow 1s ease-out;
}

@keyframes underlineGrow {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 150px;
        opacity: 0.6;
    }
}

.tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Input Section */
.input-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.button-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
}

.button-group .process-btn {
    flex: 1;
    min-width: 200px;
}

.url-input {
    flex: 1;
    min-width: 300px;
    padding: 1.25rem 1.75rem;
    font-size: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2), var(--shadow-glow);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-2px);
}

.url-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.process-btn {
    padding: 1.25rem 3rem;
    font-size: 1.05rem;
    font-weight: 600;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

.process-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;
}

.process-btn:hover:not(:disabled)::before {
    left: 100%;
}

.process-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.process-btn:active:not(:disabled) {
    transform: translateY(-1px);
}

.process-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-load-downloader {
    padding: 1.25rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-load-downloader::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-load-downloader:hover::before {
    left: 100%;
}

.btn-load-downloader:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
}

.btn-load-downloader:active {
    transform: translateY(-1px);
}

/* Tabs */
.input-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 14px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(15, 23, 42, 0.3);
}

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

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.upload-placeholder svg {
    width: 64px;
    height: 64px;
    stroke: var(--primary-color);
    opacity: 0.7;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

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

.upload-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    color: var(--success-color);
}

.upload-info #fileName {
    font-weight: 500;
    flex: 1;
}

.btn-remove {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
}

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

/* Progress Section */
.progress-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.progress-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.progress-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0.6;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.progress-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-text {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 2.5rem;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar::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 2s infinite;
}

.progress-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 14px;
    border: 2px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
    position: relative;
    overflow: hidden;
}

.step::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    transition: left 0.5s;
}

.step.active::before {
    left: 100%;
}

.step.active {
    opacity: 1;
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.15);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.step.completed {
    opacity: 1;
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.15);
}

.step-icon {
    font-size: 1.75rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.step-text {
    font-weight: 600;
    font-size: 1rem;
}

/* Clips Section */
.clips-section {
    animation: fadeInUp 0.8s ease-out;
}

.clips-header {
    text-align: center;
    margin-bottom: 3rem;
}

.clips-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

.clips-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

.clips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.clip-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
}

.clip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s;
}

.clip-card:hover::before {
    opacity: 1;
}

.clip-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--primary-color);
}

.clip-video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 177.78%; /* 9:16 aspect ratio for vertical videos */
    background: #000;
    overflow: hidden;
}

.clip-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    opacity: 0.7;
    transition: opacity 0.3s;
    z-index: 1;
}

.clip-video-wrapper:hover .clip-thumbnail {
    opacity: 0;
}

.clip-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    z-index: 2;
}

.subtitle-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Estilos para legendas */
.clip-video::cue {
    background-color: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
    padding: 6px 12px;
    border-radius: 6px;
}

video::cue {
    background-color: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.9);
    padding: 6px 12px;
    border-radius: 6px;
}

.clip-info {
    padding: 2rem;
}

.clip-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.clip-meta {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.subtitle-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-left: 0.5rem;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.clip-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.9rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.action-btn::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;
}

.action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-download {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-share {
    background: rgba(51, 65, 85, 0.6);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-share:hover {
    background: rgba(51, 65, 85, 0.8);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-subtitle {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-subtitle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn-subtitle-embed {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-subtitle-embed:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-schedule {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-schedule:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

/* Modal de Agendamento */
.schedule-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
    padding: 1rem;
}

.schedule-modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.schedule-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 24px 24px 0 0;
}

.schedule-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.schedule-modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-modal {
    background: rgba(51, 65, 85, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.close-modal:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
    transform: rotate(90deg);
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.btn-generate, .btn-refresh {
    margin-top: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-generate:hover, .btn-refresh:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-schedule-now {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    margin-top: 1rem;
}

.btn-schedule-now:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
}

.optimal-time-info {
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
}

.optimal-time-display {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.optimal-time-display .time {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.optimal-time-display .score {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.optimal-time-display .reason {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

/* Error Section */
.error-section {
    animation: fadeInUp 0.8s ease-out;
}

.error-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 4rem 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--error-color);
    position: relative;
    overflow: hidden;
}

.error-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--error-color), #dc2626);
}

.error-icon {
    font-size: 5rem;
    display: block;
    margin-bottom: 1.5rem;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--error-color);
    font-weight: 700;
}

.error-card p {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.retry-btn {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.retry-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
    position: relative;
}

.guide-link {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
    margin-bottom: 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.guide-link:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.footer-text {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Guide Page */
.back-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-light);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 600;
}

.back-link:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
}

.guide-content {
    max-width: 900px;
    margin: 0 auto;
}

.guide-intro {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    padding: 2.5rem;
    border-radius: 20px;
    margin-bottom: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.guide-intro p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.05rem;
}

.guide-intro a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

.guide-intro a:hover {
    text-decoration: underline;
}

.step-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    display: flex;
    gap: 2rem;
    animation: fadeInUp 0.6s ease-out;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

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

.step-number {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.step-content {
    flex: 1;
}

.step-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.step-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.step-list {
    list-style: none;
    padding-left: 0;
    margin: 1.5rem 0;
}

.step-list li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    padding-left: 2rem;
    position: relative;
    font-size: 1.05rem;
}

.step-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.step-list code {
    background: rgba(15, 23, 42, 0.8);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: var(--primary-light);
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.step-note {
    background: rgba(99, 102, 241, 0.15);
    border-left: 4px solid var(--primary-color);
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.code-block {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.code-header {
    background: rgba(51, 65, 85, 0.6);
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.code-block pre {
    padding: 1.5rem;
    overflow-x: auto;
    margin: 0;
}

.code-block code {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.8;
}

.tip-box {
    background: rgba(16, 185, 129, 0.15);
    border-left: 4px solid var(--success-color);
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.tip-box strong {
    color: var(--success-color);
    font-weight: 700;
}

.guide-footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2.5rem;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.guide-footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

.guide-footer a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .logo-container {
        gap: 1rem;
    }

    .logo-icon {
        width: 60px;
        height: 60px;
    }

    .logo {
        font-size: 2.5rem;
    }

    .logo-text-main,
    .logo-text-clipper {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .input-wrapper {
        flex-direction: column;
        padding: 1.25rem;
    }

    .url-input {
        min-width: 100%;
    }

    .process-btn {
        width: 100%;
        justify-content: center;
    }

    .progress-steps {
        grid-template-columns: 1fr;
    }

    .clips-grid {
        grid-template-columns: 1fr;
    }

    .step-card {
        flex-direction: column;
        gap: 1.5rem;
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .clips-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem 1rem;
    }

    .progress-card,
    .clip-card,
    .step-card {
        padding: 1.5rem;
    }

    .schedule-modal-content {
        padding: 1.5rem;
    }
}
