/* ================================
   CSS Variables & Reset
   ================================ */
:root {
    --primary-color: #ebd234;
    --secondary-color: #0bb029;
    --dark-bg: #1a1a2e;
    --light-bg: #f8f9fa;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    overflow-x: hidden;
}

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

/* ================================
   Navigation
   ================================ */
.navbar {
    background: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-bg);
    cursor: pointer;
    transition: var(--transition);
}

.logo i {
    font-size: 1.8rem;
    color: var(--primary-color);
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.logo:hover {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    padding: 1rem 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    list-style: none;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    padding: 0.75rem 1.5rem;
    display: block;
    color: var(--text-dark);
}

.dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-bg);
    border-radius: 3px;
    transition: var(--transition);
}

/* ================================
   Hero Section
   ================================ */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #16213e 100%);
    padding: 8rem 0 6rem;
    overflow: hidden;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    font-size: 2rem;
    color: var(--primary-color);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; animation-duration: 18s; }
.particle:nth-child(2) { left: 20%; top: 60%; animation-delay: 2s; animation-duration: 22s; }
.particle:nth-child(3) { left: 70%; top: 30%; animation-delay: 4s; animation-duration: 20s; }
.particle:nth-child(4) { left: 85%; top: 70%; animation-delay: 1s; animation-duration: 19s; }
.particle:nth-child(5) { left: 50%; top: 15%; animation-delay: 3s; animation-duration: 21s; }
.particle:nth-child(6) { left: 30%; top: 80%; animation-delay: 5s; animation-duration: 17s; }
.particle:nth-child(7) { left: 60%; top: 50%; animation-delay: 2.5s; animation-duration: 23s; }
.particle:nth-child(8) { left: 90%; top: 40%; animation-delay: 1.5s; animation-duration: 18s; }
.particle:nth-child(9) { left: 15%; top: 45%; animation-delay: 4.5s; animation-duration: 20s; }
.particle:nth-child(10) { left: 75%; top: 80%; animation-delay: 3.5s; animation-duration: 19s; }
.particle:nth-child(11) { left: 40%; top: 25%; animation-delay: 2s; animation-duration: 22s; }
.particle:nth-child(12) { left: 65%; top: 65%; animation-delay: 5s; animation-duration: 21s; }

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0.3;
    }
    25% {
        transform: translate(20px, -30px) rotate(90deg);
        opacity: 0.5;
    }
    50% {
        transform: translate(-15px, 20px) rotate(180deg);
        opacity: 0.2;
    }
    75% {
        transform: translate(30px, 10px) rotate(270deg);
        opacity: 0.4;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-features {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.feature-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.feature-badge i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

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

/* ================================
   Buttons
   ================================ */
.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--dark-bg);
    box-shadow: 0 5px 20px rgba(235, 210, 52, 0.4);
}

.btn-primary:hover {
    background: #d4bd2d;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(235, 210, 52, 0.5);
}

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

.btn-secondary:hover {
    background: var(--white);
    color: var(--dark-bg);
    transform: translateY(-3px);
}

/* ================================
   Section Styles
   ================================ */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-bg);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* ================================
   Features Section
   ================================ */
.features-section {
    padding: 6rem 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--light-bg);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-icon i {
    font-size: 2rem;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-bg);
}

.feature-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.feature-link {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.feature-link:hover {
    gap: 1rem;
    color: var(--primary-color);
}

/* ================================
   Tools Section
   ================================ */
.tools-section {
    padding: 6rem 0;
    background: var(--light-bg);
}

.tool-container {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tool-container:hover {
    box-shadow: var(--shadow-hover);
}

.tool-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--light-bg);
}

.tool-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tool-icon i {
    font-size: 1.8rem;
    color: var(--white);
}

.tool-header h3 {
    font-size: 1.8rem;
    color: var(--dark-bg);
    margin-bottom: 0.5rem;
}

.tool-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.tool-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.upload-area {
    border: 3px dashed var(--primary-color);
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    background: var(--light-bg);
    cursor: pointer;
    transition: var(--transition);
}

.upload-area:hover {
    background: #fff9e6;
    border-color: var(--secondary-color);
    transform: scale(1.02);
}

.upload-area.drag-over {
    background: #fff9e6;
    border-color: var(--secondary-color);
    transform: scale(1.05);
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary-color);
    display: block;
    margin-bottom: 1rem;
}

.upload-area h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--dark-bg);
}

.upload-area p {
    color: var(--text-light);
}

.tool-options {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: var(--border-radius);
}

.tool-options label {
    font-weight: 600;
    color: var(--dark-bg);
}

.format-select {
    padding: 0.75rem 1.5rem;
    border: 2px solid #dfe6e9;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

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

.quality-slider {
    width: 200px;
    height: 6px;
    border-radius: 5px;
    background: #dfe6e9;
    outline: none;
    -webkit-appearance: none;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    transition: var(--transition);
}

.quality-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--primary-color);
}

.quality-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.quality-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: var(--primary-color);
}

.compression-info {
    width: 100%;
    margin-top: 0.5rem;
}

.compression-info small {
    color: var(--text-light);
    font-style: italic;
}

.preview-area {
    min-height: 200px;
    border-radius: var(--border-radius);
    background: var(--light-bg);
    padding: 2rem;
    display: none;
}

.preview-area.active {
    display: block;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.preview-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--light-bg);
}

.preview-info {
    flex: 1;
}

.preview-info h4 {
    color: var(--dark-bg);
    margin-bottom: 0.5rem;
}

.preview-info p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.preview-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 6px;
}

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

.btn-download:hover {
    background: #099721;
}

.btn-remove {
    background: #ff6b6b;
    color: var(--white);
}

.btn-remove:hover {
    background: #ee5a52;
}

/* ================================
   Why Choose Section
   ================================ */
.why-choose-section {
    padding: 6rem 0;
    background: var(--white);
}

.why-choose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.why-card {
    text-align: center;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

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

.why-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    display: block;
}

.why-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--dark-bg);
}

.why-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ================================
   How It Works Section
   ================================ */
.how-it-works-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #16213e 100%);
    color: var(--white);
}

.how-it-works-section .section-header h2,
.how-it-works-section .section-header p {
    color: var(--white);
}

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

.step-card {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    position: relative;
}

.step-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--dark-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin: 2rem 0 1rem;
    display: block;
}

.step-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.step-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

/* ================================
   Footer
   ================================ */
.footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    transform: translateY(-3px);
}

.footer-column h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ================================
   Loading Spinner
   ================================ */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-bg);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 2rem auto;
}

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

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 1rem 0;
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }

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

    .features-grid,
    .why-choose-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .tool-header {
        flex-direction: column;
        text-align: center;
    }

    .tool-options {
        flex-direction: column;
        align-items: flex-start;
    }

    .quality-slider {
        width: 100%;
    }

    .preview-item {
        flex-direction: column;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 5rem 0 4rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
    }

    .feature-badge {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .tool-container {
        padding: 1.5rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .upload-area i {
        font-size: 2rem;
    }

    .upload-area h4 {
        font-size: 1.1rem;
    }
}

/* ================================
   Utility Classes
   ================================ */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ================================
   Success/Error Messages
   ================================ */
.message {
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease-out;
}

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

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

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