/* ========================================
   JPGtoWebP.in - Modern CSS Styles
   Primary Color: #ebd234 (Yellow)
   Secondary Color: #0bb029 (Green)
   ======================================== */

/* ========== CSS Reset & Base Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ebd234;
    --secondary-color: #0bb029;
    --dark-bg: #1a1a2e;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

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

/* ========== Navigation ========== */
.navbar {
    background: var(--white);
    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;
    padding: 1rem 0;
}

.logo {
    text-decoration: none;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark-bg);
}

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

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

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

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

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

/* ========== Hero Section ========== */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #2d3436 100%);
    color: var(--white);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.particles-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

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

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

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

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

.feature-badge:hover {
    background: rgba(235, 210, 52, 0.2);
    transform: translateY(-2px);
}

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

/* ========== Converter Section ========== */
.converter-section {
    padding: 3rem 0;
    background: var(--light-bg);
}

.converter-box {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    margin: 0 auto;
}

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

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary-color);
    background: rgba(235, 210, 52, 0.05);
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.upload-area h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.upload-area p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ========== Buttons ========== */
.btn-primary,
.btn-secondary,
.btn-success {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    pointer-events: auto;
}

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

.btn-primary:hover {
    background: #d4bf2d;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(235, 210, 52, 0.4);
}

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

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

.btn-success {
    background: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(11, 176, 41, 0.3);
}

.btn-success:hover {
    background: #099621;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 176, 41, 0.4);
}

.btn-large {
    padding: 1.1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

.btn-primary:disabled,
.btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== Files Container ========== */
.files-container {
    animation: fadeIn 0.5s ease;
}

.files-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.files-header h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
}

.files-list {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 2rem;
}

.file-item {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.file-item:hover {
    box-shadow: var(--shadow);
}

.file-preview {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
    word-break: break-word;
}

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

.file-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-pending {
    background: rgba(235, 210, 52, 0.2);
    color: #b39a1e;
}

.status-converting {
    background: rgba(52, 152, 219, 0.2);
    color: #2980b9;
}

.status-completed {
    background: rgba(11, 176, 41, 0.2);
    color: #099621;
}

.status-error {
    background: rgba(231, 76, 60, 0.2);
    color: #c0392b;
}

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

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    background: var(--white);
}

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

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

.btn-remove {
    color: #e74c3c;
    border: 2px solid #e74c3c;
}

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

.conversion-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--secondary-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* ========== Benefits Section ========== */
.benefits-section {
    padding: 4rem 0;
    background: var(--white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--dark-bg);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

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

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

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

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

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

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

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

/* ========== How It Works Section ========== */
.how-it-works {
    padding: 4rem 0;
    background: var(--light-bg);
}

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

.step-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(235, 210, 52, 0.4);
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem auto 1.5rem;
}

.step-icon i {
    font-size: 2.5rem;
    color: var(--secondary-color);
}

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

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

/* ========== Content Section ========== */
.content-section {
    padding: 4rem 0;
    background: var(--white);
}

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

.content-article h2 {
    font-size: 2.2rem;
    color: var(--dark-bg);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.content-article h3 {
    font-size: 1.7rem;
    color: var(--dark-bg);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.content-article p {
    color: var(--text-light);
    line-height: 1.9;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.content-article ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.content-article li {
    color: var(--text-light);
    line-height: 1.9;
    margin-bottom: 1rem;
}

.content-article strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* ========== FAQ Section ========== */
.faq-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

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

.faq-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.faq-question {
    font-size: 1.2rem;
    color: var(--dark-bg);
    margin-bottom: 1rem;
    display: flex;
    align-items: start;
    gap: 0.8rem;
}

.faq-question i {
    color: var(--primary-color);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.faq-answer {
    color: var(--text-light);
    line-height: 1.8;
}

/* ========== Footer ========== */
.footer {
    background: var(--dark-bg);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1rem;
}

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

.footer-logo {
    text-decoration: none;
    display: inline-block;
    margin-bottom: 1rem;
}

.footer-logo .logo-text {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
}

.footer-desc {
    line-height: 1.8;
    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);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-weight: 600;
}

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

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

.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);
    transform: translateX(5px);
}

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

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

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

.spinner {
    animation: spin 1s linear infinite;
}

/* ========== Responsive Design ========== */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        display: none;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 1rem;
        width: 100%;
    }

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

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

    .hero-features {
        gap: 1rem;
    }

    .feature-badge {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .converter-box {
        padding: 1.5rem;
    }

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

    .upload-icon {
        font-size: 3rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .benefits-grid,
    .steps-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }

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

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

    .conversion-actions {
        flex-direction: column;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .content-article h2 {
        font-size: 1.7rem;
    }

    .content-article h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .logo-text {
        font-size: 1.4rem;
    }

    .file-preview {
        width: 60px;
        height: 60px;
    }
}

/* ========== 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;
}

/* ========== Scrollbar Styling ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

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

::-webkit-scrollbar-thumb:hover {
    background: #d4bf2d;
}
