/* Cliping - Modern Video Clipper Styles */

:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --primary-light: #a29bfe;
    --secondary: #00cec9;
    --accent: #fd79a8;
    --dark: #2d3436;
    --darker: #1e272e;
    --gray: #636e72;
    --light-gray: #b2bec3;
    --lighter: #dfe6e9;
    --white: #ffffff;
    --bg: #f8f9fa;
    --card-bg: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 40px 0 30px;
    text-align: center;
    color: var(--white);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

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

.logo h1 {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.tagline {
    font-size: 1.05rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
    transition: var(--transition);
    animation: slideUp 0.4s ease-out;
}

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

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--lighter);
}

.card-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    flex: 1;
}

.card-body {
    padding: 24px;
}

.step-badge {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Input Section */
.input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.input-url {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--lighter);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.input-url:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

.input-url::placeholder {
    color: var(--light-gray);
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.4);
}

.btn-primary:disabled {
    background: var(--light-gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

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

.btn-secondary:hover {
    background: #00b5b0;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-large {
    padding: 16px 36px;
    font-size: 1.1rem;
    width: 100%;
    justify-content: center;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Platforms */
.platforms {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.platform-label {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 500;
}

.platform-tag {
    padding: 4px 10px;
    background: var(--lighter);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 500;
}

/* Video Info */
.video-info {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.video-thumb {
    width: 160px;
    height: 90px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--lighter);
}

.video-details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--gray);
}

/* Settings Form */
.settings-form {
    margin-top: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-group input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--lighter);
    border-radius: 3px;
    outline: none;
    margin-bottom: 8px;
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(108, 92, 231, 0.3);
}

.range-label {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

/* Progress Section */
.progress-content {
    text-align: center;
    padding: 40px 20px;
}

.progress-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--lighter);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.progress-content h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.progress-content p {
    color: var(--gray);
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--lighter);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s ease;
    animation: progressPulse 2s ease-in-out infinite;
}

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

/* Results Section */
.clips-count {
    background: var(--secondary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.clips-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.clip-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--lighter);
    transition: var(--transition);
}

.clip-card:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.1);
}

.clip-number {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.clip-info {
    flex: 1;
}

.clip-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.clip-meta {
    font-size: 0.8rem;
    color: var(--gray);
    display: flex;
    gap: 12px;
}

.clip-actions {
    display: flex;
    gap: 8px;
}

.results-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    padding-top: 16px;
    border-top: 1px solid var(--lighter);
}

/* Error Toast */
.error-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #d63031;
    color: var(--white);
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
    max-width: 500px;
}

.error-icon {
    font-size: 1.2rem;
}

.error-message {
    flex: 1;
    font-size: 0.9rem;
}

.error-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0.8;
}

.error-close:hover {
    opacity: 1;
}

/* Spinner inline */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Footer */
.footer {
    text-align: center;
    padding: 30px 0;
    color: var(--gray);
    font-size: 0.85rem;
}

.footer-note {
    margin-top: 4px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 30px 0 20px;
    }
    
    .logo h1 {
        font-size: 1.8rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .video-info {
        flex-direction: column;
    }
    
    .video-thumb {
        width: 100%;
        height: 180px;
    }
    
    .clip-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .clip-actions {
        width: 100%;
    }
    
    .clip-actions .btn {
        flex: 1;
        justify-content: center;
    }
    
    .results-actions {
        flex-direction: column;
    }
    
    .results-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .platforms {
        display: none;
    }
}
