:root {
    --primary: #cf2b0b;
    --primary-hover: #b12509;
    --secondary: #1a1a1a;
    --background: #fdfdfd;
    --card-bg: #ffffff;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --success: #27ae60;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3, .logo .text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Header */
.main-header {
    background: #fff;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.logo .text {
    font-size: 24px;
    color: var(--secondary);
    letter-spacing: -0.5px;
}

.nav-menu ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary);
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    text-align: center;
    background: radial-gradient(circle at top, #fff5f3 0%, #ffffff 100%);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    line-height: 1.1;
}

.hero-title .highlight {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Search Box */
.search-box-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 12px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(207, 43, 11, 0.08);
}

.search-input-wrapper {
    display: flex;
    gap: 10px;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 1.1rem;
    border-radius: 15px;
    outline: none;
    background: #f8fafc;
    font-family: inherit;
    color: var(--secondary);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 40px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

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

/* Results Grid - Clean Restoration (Print 2 Look) */
.results-grid {
    margin: 50px auto 0;
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    text-align: left;
    align-items: start;
    animation: fadeIn 0.5s ease;
}

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

.video-info-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 28px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    position: sticky;
    top: 100px;
    border: 1px solid #f1f5f9;
}

.thumbnail-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-title {
    margin-top: 24px;
    font-size: 1.25rem;
    line-height: 1.3;
    color: var(--secondary);
    font-weight: 800;
}

.formats-tabs {
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 1px solid #f1f5f9;
}

.tabs-header {
    display: flex;
    background: #ffffff;
    padding: 10px 20px 0;
    border-bottom: 2px solid #f1f5f9;
    gap: 10px;
}

.tab-btn {
    border: none;
    background: none;
    padding: 15px 25px;
    font-weight: 800;
    font-size: 1rem;
    color: #000000;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    transition: var(--transition);
}

.tab-btn i {
    width: 22px;
    height: 22px;
}

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

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 4px 4px 0 0;
}

.tab-content {
    padding: 30px;
}

/* Table */
.format-table {
    width: 100%;
    border-collapse: collapse;
}

.format-table th {
    text-align: left;
    padding: 10px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.format-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #f1f5f9;
}

.btn-download {
    background: #f1f5f9;
    color: var(--secondary);
    border: none;
    padding: 8px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    border-radius: 25px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.modal-header {
    display: flex;
    justify-content: center;
    position: relative;
    margin-bottom: 20px;
}

.modal-header h3 {
    font-size: 1.5rem;
}

.close-modal {
    position: absolute;
    right: -10px;
    top: -10px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.progress-container {
    height: 12px;
    background: #f1f5f9;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-bar.indeterminate {
    width: 100%;
    background: #f1f5f9;
}

.progress-bar.indeterminate::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: var(--primary);
    animation: indeterminate-progress 1.5s infinite linear;
    border-radius: 10px;
}

@keyframes indeterminate-progress {
    0% { left: -40%; }
    100% { left: 100%; }
}

.btn-success {
    background: var(--success);
    color: white;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    transition: var(--transition);
}

.btn-success:hover {
    background: #219150;
    transform: scale(1.05);
}

/* Features */
.features-section {
    padding: 100px 0;
    background: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

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

.icon-box {
    width: 60px;
    height: 60px;
    background: #fff5f3;
    color: var(--primary);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    font-size: 24px;
}

/* Footer */
.main-footer {
    padding: 50px 0;
    border-top: 1px solid #eee;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* File Converter Specific Styles */
.converter-section {
    padding: 80px 0;
    text-align: center;
    min-height: calc(100vh - 200px);
}

.converter-section .hero-title {
    margin-bottom: 0.5rem;
}

.dropzone-container {
    max-width: 650px;
    margin: 60px auto;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    padding: 60px 40px;
    border-radius: 30px;
    border: 2px dashed #e2e8f0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.05);
}

.dropzone-container:hover, .dropzone-container.dragover {
    border-color: var(--primary);
    background: #fff;
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 40px 80px rgba(207, 43, 11, 0.1);
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.dropzone-content i {
    font-size: 4rem;
    color: var(--primary);
    background: #fff5f3;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 10px;
    transition: var(--transition);
}

.dropzone-container:hover .dropzone-content i {
    transform: rotate(5deg) scale(1.1);
}

.dropzone-content h3 {
    font-size: 1.8rem;
    color: var(--secondary);
    font-weight: 800;
}

.dropzone-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.dropzone-content small {
    display: inline-block;
    padding: 6px 15px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 10px;
}

#fileInput {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.selected-file-card {
    max-width: 700px;
    margin: 40px auto;
    background: #fff;
    padding: 30px;
    border-radius: 25px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
    animation: slideUp 0.4s ease;
}

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

.selected-file-card .file-info {
    flex-direction: column;
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid #f1f5f9;
}

.selected-file-card .file-info i {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.selected-file-card .file-details h4 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.conversion-options {
    flex-direction: column;
    gap: 20px;
}

.conversion-options .format-picker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: #f8fafc;
    padding: 15px 30px;
    border-radius: 18px;
    width: 100%;
}

.select-format {
    padding: 12px 25px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.select-format:focus {
    border-color: var(--primary);
}

.btn-convert {
    background: var(--primary);
    color: white;
    border: none;
    padding: 18px 50px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 10px 25px rgba(207, 43, 11, 0.2);
}

.btn-convert:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(207, 43, 11, 0.3);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .search-input-wrapper {
        flex-direction: column;
    }
    
    .btn-primary {
        padding: 15px;
        justify-content: center;
    }

    .selected-file-card {
        padding: 20px;
    }

    .conversion-options .format-picker {
        flex-direction: column;
        gap: 10px;
    }
}
