/* Professional PDF Converter Theme - Production Version */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Navigation */
.top-nav {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FF4444;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.nav-links {
    display: flex;
    align-items: center;
    width: 100%;
}

.categories-nav {
    display: flex;
    align-items: center;
    flex: 1;
}

.nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-item {
    position: relative;
}

.category-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-radius: 6px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: block;
    white-space: nowrap;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.category-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FF4444, #FF6B6B);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.category-link:hover::before,
.category-dropdown.active .category-link::before {
    width: 100%;
}

.category-link:hover,
.category-dropdown.active .category-link {
    color: #FF4444;
    background: rgba(255, 68, 68, 0.08);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.15);
}

.category-dropdown.active .category-link {
    animation: categoryPulse 0.6s ease;
}

@keyframes categoryPulse {
    0% { transform: translateY(-1px) scale(1); }
    50% { transform: translateY(-1px) scale(1.05); }
    100% { transform: translateY(-1px) scale(1); }
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-link:hover {
    color: #FF4444;
    background: rgba(255, 68, 68, 0.1);
}

.nav-icon {
    font-size: 1rem;
}

/* Category Dropdown Menu */
.category-dropdown {
    position: relative;
    margin-right: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-dropdown:hover {
    transform: translateY(-2px);
}

.category-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    min-width: 220px;
    padding: 12px 0;
    margin-top: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-top: 3px solid #FF4444;
}

.category-dropdown.active .category-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    animation: dropdownSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownSlideIn {
    0% { 
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
    50% { 
        opacity: 0.8;
        transform: translateY(-5px) scale(1.02);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.category-tool-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    margin: 2px 6px;
    border-radius: 8px;
}

.category-tool-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #FF4444, #FF6B6B);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.category-tool-link:hover {
    background: #f8f9ff;
    color: #FF4444;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.2);
}

.category-tool-link:hover::before {
    width: 4px;
}

.category-tool-link:hover .tool-icon-file {
    animation: iconBounce 0.6s ease;
    transform: scale(1.1);
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1.1); }
    50% { transform: scale(1.3); }
}

.tool-icon-file {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    color: #FF4444;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Staggered Animation for Menu Items */
.category-dropdown.active .category-tool-link {
    animation: slideInItem 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.category-dropdown.active .category-tool-link:nth-child(1) { animation-delay: 0.1s; }
.category-dropdown.active .category-tool-link:nth-child(2) { animation-delay: 0.15s; }
.category-dropdown.active .category-tool-link:nth-child(3) { animation-delay: 0.2s; }
.category-dropdown.active .category-tool-link:nth-child(4) { animation-delay: 0.25s; }
.category-dropdown.active .category-tool-link:nth-child(5) { animation-delay: 0.3s; }
.category-dropdown.active .category-tool-link:nth-child(6) { animation-delay: 0.35s; }
.category-dropdown.active .category-tool-link:nth-child(7) { animation-delay: 0.4s; }
.category-dropdown.active .category-tool-link:nth-child(8) { animation-delay: 0.45s; }

@keyframes slideInItem {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 20px 40px;
    text-align: center;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.5;
}

/* Converter Section */
.converter-section {
    padding: 0 20px 80px;
    position: relative;
}

.converter-tool {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin: -60px auto 0;
    max-width: 600px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    position: relative;
    z-index: 10;
}

.converter-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 24px;
    text-align: center;
    font-weight: 600;
}

.file-drop-zone {
    border: 2px dashed #667eea;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #f8f9ff;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.file-drop-zone:hover,
.file-drop-zone.dragover {
    border-color: #FF4444;
    background: #fff5f5;
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 68, 68, 0.2);
}

.file-drop-zone.dragover {
    animation: dragPulse 1s ease-in-out infinite;
}

@keyframes dragPulse {
    0%, 100% { 
        border-color: #FF4444; 
        background: #fff5f5;
    }
    50% { 
        border-color: #FF6B6B; 
        background: #fff0f0;
    }
}

.drop-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 16px;
    display: block;
}

.drop-text {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.drop-subtext {
    font-size: 0.9rem;
    color: #999;
}

.file-list {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: white;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #e5e5e5;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.file-details {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.file-size {
    font-size: 0.8rem;
    color: #666;
}

.remove-file {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8rem;
}

.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 150px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn.primary {
    background: linear-gradient(135deg, #FF4444 0%, #FF6B6B 100%);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Tools Section */
.tools-section {
    padding: 80px 20px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.tools-section.highlighted {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.05) 0%, rgba(102, 126, 234, 0.05) 100%);
    animation: sectionHighlight 2s ease;
}

@keyframes sectionHighlight {
    0% { background: #f8f9fa; }
    50% { background: linear-gradient(135deg, rgba(255, 68, 68, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%); }
    100% { background: #f8f9fa; }
}

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

.section-title {
    text-align: center;
    font-size: 2.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 50px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.tool-card {
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: #FF4444;
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: #FF4444;
}

.tool-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.tool-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Features Section */
.features-section {
    padding: 80px 20px;
    background: white;
}

.features-container {
    max-width: 1000px;
    margin: 0 auto;
}

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

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

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: white;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
}

.feature-description {
    color: #666;
    line-height: 1.6;
}

/* Footer */
.main-footer {
    background: #333;
    color: white;
    padding: 60px 20px 30px;
}

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

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

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: white;
}

.footer-link {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: #FF4444;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 30px;
    text-align: center;
    color: #999;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    text-align: center;
}

.processing-animation {
    margin-bottom: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF4444;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
    margin: 0 auto;
}

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

.progress-bar {
    width: 100%;
    height: 10px;
    background: #f3f3f3;
    border-radius: 5px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #FF4444 0%, #FF6B6B 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 5px;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 68, 68, 0.1);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s;
    border-radius: 2px;
}

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

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

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

/* Mobile Menu */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 999;
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-nav.active {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.mobile-nav-content {
    padding: 20px;
}

.mobile-tools-category {
    margin-bottom: 25px;
}

.mobile-tools-category h4 {
    color: #FF4444;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-tools-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.mobile-tool-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.mobile-tool-link:hover {
    background: #f8f9ff;
    color: #FF4444;
    border-color: #FF4444;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .categories-nav {
        display: none;
    }
    
    .nav-right .all-tools-trigger {
        display: flex;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .category-dropdown-menu {
        min-width: 250px;
        left: -100px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .converter-tool {
        margin: -40px 20px 0;
        padding: 30px 20px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .converter-tool {
        padding: 20px 15px;
    }
    
    .file-drop-zone {
        padding: 30px 15px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

/* Print Styles */
@media print {
    .top-nav,
    .modal {
        display: none !important;
    }
}

/* Additional Animations */
.ripple-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 68, 68, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: ripple 0.6s ease-out;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* Closing animation for dropdowns */
.category-dropdown.closing .category-dropdown-menu {
    animation: dropdownSlideOut 0.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes dropdownSlideOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

/* Tool Cards - Original Styling Enhanced */
.tool-card {
    background: white;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    border: 1px solid #e5e5e5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 68, 68, 0.1), transparent);
    transition: left 0.6s ease;
}

.tool-card:hover::before {
    left: 100%;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-color: #FF4444;
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: #FF4444;
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon {
    animation: toolIconFloat 2s ease-in-out infinite;
    transform: scale(1.1);
}

@keyframes toolIconFloat {
    0%, 100% { transform: scale(1.1) translateY(0); }
    50% { transform: scale(1.1) translateY(-5px); }
}

.tool-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.tool-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
button:focus,
.tool-card:focus,
.nav-link:focus {
    outline: 2px solid #FF4444;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-section {
        background: #000;
    }
    
    .tool-card {
        border: 2px solid #333;
    }
}