/* Modern CSS with attractive design - Desktop & Mobile Responsive */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: rgba(67, 97, 238, 0.1);
    --secondary: #7209b7;
    --secondary-light: rgba(114, 9, 183, 0.1);
    --accent: #f72585;
    --accent-light: rgba(247, 37, 133, 0.1);
    --success: #4cc9f0;
    --success-light: rgba(76, 201, 240, 0.1);
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.12);
    --shadow-large: 0 25px 50px rgba(0, 0, 0, 0.15);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-accent: linear-gradient(135deg, var(--accent), var(--secondary));
    --gradient-dark: linear-gradient(135deg, var(--dark), #000);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: #f8fafc;
    color: var(--dark);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Enhanced Header with Glass Effect */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    color: var(--dark);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
  height: 40px;   /* logo size */
  justify-content: flex-start;
  width: auto;
}


.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.6rem;
    font-weight: 800;
    text-decoration: none;
    transition: var(--transition);
}

.logo-icon {
    background: var(--gradient-primary);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.3);
    transition: var(--transition);
}

.logo:hover .logo-icon {
    transform: rotate(-10deg) scale(1.1);
}

.h1Logo {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 26px;
    letter-spacing: -0.5px;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    position: relative;
    display: inline-block;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 80%;
}

nav a:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.auth-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 12px 28px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.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;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.2);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(67, 97, 238, 0.4);
}

.mobile-menu {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--primary);
    background: var(--primary-light);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-underline-offset: none;
}

.mobile-menu:hover {
    background: var(--primary);
    color: white;
}
/* Ad Container Styles */


/* ========Tool section ========================================Tool Section============================================================================*/
.tool-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    padding: clamp(20px, 4vw, 30px);
    margin: 30px 0;
    width: 100%;
}

.tool-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 20px;
    color: var(--primary);
    line-height: 1.3;
    text-align: center;
    font-weight: bold;
}

.tool-description {
    color: #666;
    margin-bottom: 30px;
    font-size: clamp(0.95rem, 2vw, 1rem);
    line-height: 1.6;
    text-align: center;
}

.converter-container {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(20px, 4vw, 30px);
}

.upload-area {
    flex: 1;
    min-width: min(100%, 300px);
}

.upload-box {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: clamp(25px, 5vw, 40px) clamp(15px, 3vw, 20px);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
    background: white;
}

.upload-box:hover {
    border-color: var(--primary);
    background-color: #f5f5f5;
}

.fas.fa-cloud-upload-alt {
    font-size: clamp(2.5rem, 6vw, 3rem);
    color: var(--primary);
    margin-bottom: 15px;
}

.upload-text {
    margin-bottom: 15px;
    color: #555;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: clamp(8px, 2vw, 10px) clamp(15px, 3vw, 20px);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    font-size: clamp(0.9rem, 2vw, 1rem);
    min-height: 44px;
}

.btn:hover {
    background-color: (--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: clamp(8px, 2vw, 10px);
    background-color: #7599fc;
    border-radius: 4px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.file-icon {
    margin-right: 10px;
    color: #2c5aa0;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.file-name {
    flex-grow: 1;
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #ffffff;
}

.file-remove {
    color: #dc3545;
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.2rem;
    padding: 5px;
    flex-shrink: 0;
}

.options-area {
    flex: 1;
    min-width: min(100%, 300px);
}

.option-group {
    margin-bottom: clamp(15px, 3vw, 25px);
}

.option-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: #444;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.option-select {
    width: 100%;
    padding: clamp(8px, 2vw, 10px);
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
    font-size: clamp(0.9rem, 2vw, 1rem);
    min-height: 44px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.checkbox-group input {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    min-width: 18px;
}

.watermark-options, .password-options {
    margin-left: 25px;
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.watermark-options input, .password-options input {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.preview-area {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
    width: 100%;
}

.preview-title {
    font-weight: 600;
    margin-bottom: 15px;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(10px, 2vw, 15px);
}

.preview-item {
    width: clamp(80px, 15vw, 120px);
    text-align: center;
    flex-shrink: 0;
}

.preview-img {
    width: 100%;
    height: clamp(100px, 20vw, 150px);
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.preview-img:hover {
    transform: scale(1.05);
}

.preview-name {
    margin-top: 5px;
    font-size: clamp(0.75rem, 1.6vw, 0.85rem);
    color: #666;
    word-break: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.action-buttons {
    display: flex;
    gap: clamp(10px, 2vw, 15px);
    margin-top: 30px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    flex: 1;
    min-width: min(100%, 200px);
    justify-content: center;
}

/*=====tool section end========================================Tool Section End============================================================================*/

/* Footer Styles */
footer {
    background: var(--dark);
    color: white;
    padding: clamp(2rem, 5vw, 3rem) 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: clamp(1rem, 3vw, 2rem);
    margin-bottom: 2rem;
}

.footer-column h3 {
    margin-bottom: 1.5rem;
    font-size: clamp(1.1rem, 2.5vw, 1.2rem);
    position: relative;
    padding-bottom: 10px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column a {
    color: #adb5bd;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
    padding: 3px 0;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.footer-column a:hover {
    color: white;
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #495057;
    color: #adb5bd;
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    width: clamp(45px, 8vw, 50px);
    height: clamp(45px, 8vw, 50px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 100;
    transition: var(--transition);
    border: none;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: clamp(12px, 3vw, 18px);
    margin-top: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.social-icon {
    font-size: clamp(1.5rem, 3vw, 1.8rem);
    color: #adb5bd;
    transition: transform 0.3s, color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: clamp(35px, 7vw, 40px);
    height: clamp(35px, 7vw, 40px);
    background: transparent;
    text-decoration: none;
}

.social-icon:hover {
    transform: scale(1.25) rotate(-12deg);
    color: var(--primary);
    background: rgba(67, 97, 238, 0.15);
}

.social-icon.facebook:hover { color: #3b5998; }
.social-icon.instagram:hover { color: #e4405f; }
.social-icon.linkedin:hover { color: #0e76a8; }
.social-icon.twitter:hover { color: #1da1f2; }
.social-icon.youtube:hover { color: #ff0000; }

.dark-mode-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--gradient-primary);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-large);
    z-index: 100;
    transition: var(--transition);
    border: none;
    font-size: 1.5rem;
}

.dark-mode-toggle:hover {
    transform: scale(1.1) rotate(30deg);
    box-shadow: 0 15px 35px rgba(67, 97, 238, 0.4);
}

/* ===================================Dark Mode Styles=================================================== */
body.dark-mode {
    background-color: #0f172a;
    color: #ffffff;
}

body.dark-mode header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-mode nav a,
body.dark-mode .logo {
    color: #e2e8f0;
}

body.dark-mode nav a:hover {
    background: rgba(67, 97, 238, 0.2);
}

body.dark-mode .tool-card,
body.dark-mode .category-card,
body.dark-mode .features,
body.dark-mode .tabs-container,
body.dark-mode .feature-item,
body.dark-mode .search-box,
body.dark-mode .tool-section,
body.dark-mode .option-select {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .tool-card h3,
body.dark-mode .category-card h3,
body.dark-mode .feature-item h3,
body.dark-mode .section-title,
body.dark-mode .category-title,
body.dark-mode .option-title,
body.dark-mode .tool-description,
body.dark-mode .option-select {
    color: #ffffff;
}

body.dark-mode .tool-card p,
body.dark-mode .category-card p,
body.dark-mode .feature-item p,
body.dark-mode .hero p,
body.dark-mode .upload-text,
body.dark-mode .section-subtitle {
    color: #ffffff;
}

body.dark-mode .search-box input,
body.dark-mode .upload-box {
    background: #1e293b;
    color: #f1f5f9;
}

body.dark-mode footer {
    background: #0f172a;
}

body.dark-mode .tab:hover {
    background-color: rgba(67, 97, 238, 0.2);
}

body.dark-mode .btn-outline {
    border-color: #4cc9f0;
    color: #ffffff;
}

body.dark-mode .btn-outline:hover {
    background: var(--gradient-primary);
    color: #ffffff;
}

/*=========== Responsive Design=======================Responsive Design============================================== */
@media (max-width: 992px) {
    .header-content {
        flex-wrap: nowrap;
    }
    
    .nav-menu {
        gap: 10px;
    }
    
    .auth-buttons {
        margin-left: 10px;
    }
    
    .converter-container {
        flex-direction: column;
    }
    
    .upload-area, .options-area {
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .mobile-menu {
        display: block;
        order: 1;
         width: 40px;
         height: 40px;
        
    }
    
    i.fa-bars {
   display: flex;
   align-items: center;
   
   justify-content: center;
   width: 40px;
   height: 40px;
    }
    
    .logo {
        order: 0;
        flex: 1;
    }
    
    .auth-buttons {
        display: none;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        display: none;
        z-index: 999;
    }
    
    .nav-menu.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from { transform: translateY(-20px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        display: block;
        padding: 12px 20px;
        text-align: center;
        border-radius: var(--border-radius);
    }
    
    .nav-menu a:hover {
        background-color: rgba(129, 50, 50, 0.377);
    }
    
    .auth-buttons.mobile {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 20px 0 0;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .auth-buttons.mobile .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-column h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-icons {
        justify-content: center;
    }
    
    .preview-container {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        padding: 10px 0;
    }
    
    .tool-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .ad-container {
        margin: 10px auto;
        min-height: 75px;
    }
    
    .upload-box {
        padding: 20px 15px;
    }
    
    .preview-item {
        width: 100px;
    }
    
    .preview-img {
        height: 120px;
    }
    
    .dark-mode-toggle {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .file-icon {
        margin-right: 0;
    }
    
    .file-name {
        width: 100%;
    }
}

/* Utility Classes */
.hidden-mobile {
    display: none;
}

@media (min-width: 769px) {
    .hidden-desktop {
        display: none;
    }
    .hidden-mobile {
        display: flex;
    }
}

/* Accessibility Improvements */
.btn:focus,
.option-select:focus,
input:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1001;
}

.skip-to-content:focus {
    top: 0;
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}