@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --secondary-color: #9333ea;
    --accent-color: #06b6d4;
    --bg-color: #0f172a;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background: radial-gradient(circle at top right, #4f46e5, transparent),
        radial-gradient(circle at bottom left, #9333ea, transparent),
        #0f172a;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 70vh;
    padding: 20px;
    padding-top: 100px;
    /* Added padding to avoid fixed navbar overlap */
    position: relative;
    overflow-x: hidden;
    color: var(--text-color);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    animation: backgroundShift 15s ease infinite;
}

@keyframes backgroundShift {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.container {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    max-width: 1100px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    position: relative;
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 60px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header-glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px 50px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    z-index: 5;
    margin-bottom: 20px;
    max-width: 90%;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: headerGlow 10s linear infinite;
}

@keyframes headerGlow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

header h1 {
    font-size: 52px;
    font-weight: 900;
    margin-bottom: 12px;
    position: relative;
    z-index: 5;
    letter-spacing: -2px;
    background: linear-gradient(to bottom, #ffffff 30%, #e2e8f0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

header p {
    font-size: 18px;
    opacity: 0.9;
    position: relative;
    z-index: 5;
    font-weight: 500;
    max-width: 700px;
    margin: 0 auto 15px;
    color: rgba(255, 255, 255, 0.95);
}

.backend-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin-top: 15px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4d4d;
}

.status-dot.online {
    background: #00ff00;
    box-shadow: 0 0 8px #00ff00;
}

.server-notice {
    background: #fff8e1;
    border-left: 4px solid #ffca28;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 10px;
}

.server-notice b {
    color: #533f03;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.5);
}

.tab-btn {
    flex: 1;
    padding: 15px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: #7f8fa6;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform: translateX(-50%);
}

.tab-btn.active {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.tab-btn.active::before {
    width: 100%;
}

.tab-btn:hover:not(.active) {
    background-color: rgba(79, 70, 229, 0.08);
    transform: translateY(-1px);
    color: var(--primary-color);
}

.content {
    padding: 20px;
    perspective: 1200px;
    position: relative;
}

.tab-content {
    display: none;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.tab-content.active {
    display: block;
    animation: flipIn 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.tab-content.flip-out {
    animation: flipOut 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes flipIn {
    0% {
        opacity: 0;
        transform: rotateY(-90deg) scale(0.9);
        filter: blur(4px);
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
        transform: rotateY(0deg) scale(1);
        filter: blur(0px);
    }
}

@keyframes flipOut {
    0% {
        opacity: 1;
        transform: rotateY(0deg) scale(1);
        filter: blur(0px);
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 0;
        transform: rotateY(90deg) scale(0.9);
        filter: blur(4px);
    }
}

/* Fallback for older browsers */
@media (prefers-reduced-motion: reduce) {
    .tab-content.active {
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

.seo-title {
    display: block;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    background-color: #fafbfc;
    position: relative;
}

.upload-area::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 10px;
    padding: 2px;
    background: linear-gradient(135deg, var(--primary-color), #667eea);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: transparent;
    background-color: #f0f7ff;
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 24px rgba(74, 144, 226, 0.15);
}

.upload-area:hover::before,
.upload-area.dragover::before {
    opacity: 1;
}

.upload-area .icon {
    transition: transform 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.upload-area:hover .icon,
.upload-area.dragover .icon {
    transform: scale(1.1) rotate(5deg);
}

.upload-area .icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.browse-btn {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: underline;
}

.preview-area {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
    padding: 4px;
}

.preview-area::-webkit-scrollbar {
    width: 8px;
}

.preview-area::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.preview-area::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.preview-area::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.preview-item {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 12px;
    /* overflow: hidden; Removed to allow button to stick out if needed */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    animation: itemFadeIn 0.4s cubic-bezier(0.4, 0.0, 0.2, 1) backwards;
    background: #fff;
}

/* Specific override for Merge PDF List Items */
.preview-item.merge-item {
    width: 100%;
    height: auto;
    overflow: visible;
    /* Ensure button is seen */
    position: relative;
}

@keyframes itemFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* Universal Remove Button Style */
.preview-item .remove-btn,
.remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff0000;
    /* Bright Red */
    color: white;
    border: 2px solid white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    /* Always visible */
    transition: all 0.2s ease;
    z-index: 100;
    /* High Z-Index */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.preview-item .remove-btn:hover,
.remove-btn:hover {
    background: #cc0000;
    transform: scale(1.1);
}

/* For Merge Items (List View), adjust button position if needed */
.preview-item.merge-item .remove-btn {
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    position: absolute;
}

.action-btn {
    width: 100%;
    padding: 14px 24px;
    margin-top: 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:disabled {
    background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5);
}

.action-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

/* Split PDF Options */
.split-options {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.option-group {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-group:last-child {
    margin-bottom: 0;
}

.range-input {
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    flex: 1;
    font-size: 14px;
}

.range-input:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* PPT Rendering */
#pptx-render-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 1000px;
    /* Standard width used by library mostly */
    z-index: -1000;
    visibility: hidden;
    /* Use hidden visibility instead of display none so it renders */
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 5px;
        padding-top: 80px;
        /* Reduced for mobile */
    }

    .container {
        max-width: 100%;
        border-radius: 12px;
        margin-bottom: 30px;
    }

    header h1 {
        font-size: 28px;
        letter-spacing: -1px;
    }

    header p {
        font-size: 14px;
        padding: 0 10px;
    }

    .tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px;
    }

    .tab-btn {
        width: 100%;
        font-size: 14px;
        padding: 12px 8px;
        border-radius: 8px;
    }

    .upload-area {
        padding: 25px 15px;
    }

    .preview-item {
        width: 80px;
        height: 80px;
    }

    .action-btn {
        font-size: 14px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 24px 16px;
    }

    header h1 {
        font-size: 20px;
    }

    .tab-btn {
        flex: 1 1 100%;
        font-size: 14px;
    }

    .content {
        padding: 20px 16px;
    }

    /* Prevent mobile zoom on focus */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    .preview-item {
        width: 80px;
        height: 80px;
    }
}

/* --- New UI Components --- */


/* Premium Navbar & Dropdown Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 2000;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 4px;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-image {
    width: 60px;
    /* Increased size slightly */
    height: 60px;
    object-fit: cover;
    /* Ensures image fills the circle */
    border-radius: 50%;

    /* Visible Blue Line + White Gap */
    border: 3px solid #4f46e5;
    box-shadow: 0 0 0 2px white inset;
    /* Inner white gap */

    background: white;
    padding: 0;
    /* Remove padding to fill circle */
    overflow: hidden;
    /* Hide outside object */
}

.logo:hover .logo-image {
    filter: drop-shadow(0 4px 12px rgba(79, 70, 229, 0.5));
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
    line-height: 1;
}

.logo-tagline {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: 10px;
}

.nav-auth .action-btn {
    width: auto;
    padding: 10px 20px;
    margin-top: 0;
    font-size: 14px;
    border-radius: 50px;
}

.nav-auth .nav-link {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 14px;
}

.nav-auth .nav-link:hover {
    background: rgba(79, 70, 229, 0.08);
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 15px;
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown Styles */
.nav-dropdown {
    position: relative;
}

.dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.dropdown-btn:hover {
    background: rgba(79, 70, 229, 0.08);
}

.arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(3, 220px);
    gap: 25px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 2001;
    margin-top: 15px;
    width: auto;
}

/* Mega Menu Modifiers */
.dropdown-content.mega-menu {
    width: 95vw;
    max-width: 1400px;
    /* Increased for better visibility */
    grid-template-columns: repeat(5, 1fr);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
}

@media (max-width: 1024px) {
    .dropdown-content.mega-menu {
        position: relative;
        left: 0;
        transform: none;
        width: 100%;
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
        max-height: 400px;
        overflow-y: auto;
        box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
        margin-top: 10px;
    }
}

.dropdown-content.show,
.nav-dropdown:hover .dropdown-content,
.nav-dropdown.active .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Dropdown Column Styling */
.dropdown-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.column-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.group-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.dropdown-content a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 15px;
    /* Increased from 13px */
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: block;
}

.dropdown-content a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(3px);
}

.dropdown-content a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.dropdown-content a:hover::before {
    transform: scaleY(1);
}

.dropdown-content a:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.12), rgba(147, 51, 234, 0.12));
    color: var(--primary-color);
    padding-left: 18px;
}

/* Tool Highlights */
.dropdown-content a.hl-ai {
    background: rgba(79, 70, 229, 0.05);
    border: 1px solid rgba(79, 70, 229, 0.2);
    color: #4f46e5;
    font-weight: 600;
}

.dropdown-content a.hl-ai:hover {
    background: var(--primary-color);
    color: white;
}

.dropdown-content a.hl-resize {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #059669;
    font-weight: 600;
}

.dropdown-content a.hl-resize:hover {
    background: #10b981;
    color: white;
}

/* Category Item Icons */
.dropdown-content a i {
    width: 20px;
    margin-right: 10px;
    font-size: 14px;
    opacity: 0.8;
}

/* Sidebar Tool Grid Styling */
.mobile-tools-grid {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 12px;
}

.mobile-tool-item {
    background: white !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.mobile-tool-item i {
    color: #4f46e5;
}

/* Auth Buttons */
#nav-login-btn {
    padding: 8px 16px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s ease;
}

#nav-login-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

#nav-feedback-btn {
    color: var(--text-light);
    font-weight: 500;
}

#nav-signup-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white !important;
    padding: 10px 24px !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

#nav-signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

/* Mobile Menu Toggle & Responsive Navbar */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 5005;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color, #1e293b);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1999;
}

@media (max-width: 1024px) {
    .nav-links {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex;
    }
}

/* Sidebar removal - consolidated below */

/* Privacy Badge removal - consolidated below */

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    /* Consistently right aligned */
    width: 320px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
    z-index: 6000;
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.active {
    right: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 4999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.sidebar-brand {
    font-size: 1.2rem;
    font-weight: 800;
    color: #4f46e5;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-sidebar-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 5px;
}

.sidebar-content {
    padding: 20px;
    flex: 1;
}

.sidebar-user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.sidebar-user-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 15px;
}

.sidebar-group {
    margin-bottom: 25px;
}

.sidebar-group-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    border-radius: 10px;
    margin-bottom: 8px;
    background: #f8fafc;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: #f1f5f9;
    color: #4f46e5;
}

.mobile-tools-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 10px;
}

.mobile-tool-item {
    font-size: 13px;
    padding: 10px 8px;
    margin-bottom: 0;
    text-align: center;
    flex-direction: column;
    gap: 4px;
}

.sidebar-dropdown-btn {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

#mobile-tools-arrow {
    transition: transform 0.3s ease;
    font-size: 12px;
}



/* Fix Privacy Banner on Mobile */
.privacy-badge {
    margin: 10px 15px 30px;
    /* Add side margins */
    padding: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: left;
    /* Better readability */
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.privacy-badge span {
    font-size: 1.2rem;
    /* Lock icon size */
    flex-shrink: 0;
}

.nav-auth div {
    display: flex;
    align-items: center;
    gap: 10px !important;
}

#nav-signup-btn {
    width: 100% !important;
}

/* Cleaned up duplicate dropdown logic - mega-menu now handles this */

/* Hamburger Menu Animation */
.mobile-menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


@media (max-width: 480px) {
    .logo-image {
        width: 45px;
        height: 45px;
    }

    .logo-text {
        font-size: 18px;
    }

    .logo-tagline {
        font-size: 8px;
    }
}

/* Footer */
.footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 80px 20px 40px;
    margin-top: 80px;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
    position: relative;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.footer-section p {
    line-height: 1.6;
    font-size: 14px;
    opacity: 0.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-link {
    color: #a0aec0;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.footer-link:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    opacity: 0.6;
}

/* Password Toggle Custom */
.password-input-wrapper #toggle-password {
    user-select: none;
    transition: transform 0.2s ease;
}

.password-input-wrapper #toggle-password:active {
    transform: translateY(-50%) scale(0.9);
}

/* Space for body due to fixed nav */
body {
    padding-top: 0;
    /* Let nav handle it if sticky */
}

/* Blog & Article Styles */
.article-image {
    width: 100%;
    border-radius: 16px;
    margin: 20px 0;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
}


/* Jewelry Enhancer Styles */
#jewelry-enhance {
    text-align: center;
}

#jewelry-preview {
    margin-top: 20px;
    min-height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

#jewelry-bg-mode {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

#jewelry-bg-mode:focus {
    border-color: var(--primary-color);
}

#jewelry-enhance-check {
    width: 18px;
    height: 18px;
    accent-color: #d4a017;
    /* Gold color */
}

/* Enhancer Toggle Switch Look (Optional, keeping simple checkboxes for now) */

.jewelry-result-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.jewelry-result-box {
    text-align: center;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.jewelry-result-box img {
    max-height: 250px;
    border-radius: 4px;
}

.article-image:hover {
    transform: scale(1.02);
}

.blog-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.blog-card-content {
    padding: 24px;
}

@media (max-width: 768px) {
    .nav-links {
        gap: 15px;
    }

    .nav-link {
        font-size: 14px;
    }

    .logo-text {
        font-size: 20px;
    }
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 16px;
    width: 95%;
    max-width: 450px;
    max-height: 90vh;
    /* Ensure modal doesn't exceed screen */
    overflow-y: auto;
    /* Scrollable if long signup form */
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #64748b;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--text-color);
}

.auth-form h2 {
    margin-bottom: 20px;
    color: var(--text-color);
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.ai-percentage {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--secondary-color);
}

.credits-badge {
    display: inline-block;
    padding: 6px 12px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.credits-badge.low {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fdba74;
}

.credits-badge.none {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 20px;
    transition: background 0.2s;
}

.google-btn:hover {
    background: #f8fafc;
}

.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    background: white;
    padding: 0 10px;
    position: relative;
    color: var(--text-light);
    font-size: 14px;
}

.auth-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* --- Passport Features List --- */
.features-list {
    margin: 20px 0;
    background: #f0f9ff;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #bae6fd;
}

.features-list ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #0c4a6e;
}

.features-list li span {
    color: #0284c7;
}

/* Resize for Print Options */
.resize-options {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.resize-controls {
    background: #f8f9fa;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 500px;
    text-align: left;
    box-shadow: var(--shadow-sm);
}

.control-group {
    margin-bottom: 20px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: var(--text-color);
    font-size: 14px;
}

.control-group select {
    padding: 10px 12px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: white;
    font-size: 14px;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s;
}

.control-group select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.radio-group {
    display: flex;
    gap: 20px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500 !important;
    font-size: 14px;
    margin-bottom: 0 !important;
}

.radio-label input[type="radio"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

/* Donation / Coffee Section */
.coffee-section {
    margin: 60px 0;
    padding: 50px 30px;
    background: linear-gradient(135deg, #fffcf0 0%, #fff9e6 100%);
    border: 2px solid #ffecb3;
    border-radius: 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.coffee-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

.coffee-text {
    flex: 1;
    min-width: 300px;
    text-align: left;
}

.coffee-text h2 {
    font-size: 28px;
    color: #856404;
    margin-bottom: 15px;
}

.coffee-text p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.qr-box {
    background: white;
    padding: 15px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid #eee;
}

.qr-box img {
    width: 200px;
    height: auto;
    display: block;
    border-radius: 8px;
}

.upi-id {
    margin-top: 10px;
    font-family: monospace;
    font-weight: bold;
    color: var(--primary-color);
    background: #f0f7ff;
    padding: 4px 10px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .coffee-text {
        text-align: center;
    }
}

/* --- Compression Quality Cards --- */
.radio-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.radio-card input[type="radio"] {
    accent-color: var(--primary-color);
    transform: scale(1.2);
}

@media (max-width: 480px) {
    .compress-options {
        padding: 15px !important;
    }

    .radio-card {
        width: 100% !important;
        /* Full width on mobile */
        flex-direction: row !important;
        justify-content: space-between !important;
        padding: 15px !important;
    }
}

/* --- VIBRANT GRID UI & ROCKET SEO --- */

:root {
    --vibrant-blue: #3b82f6;
    --vibrant-purple: #8b5cf6;
    --vibrant-orange: #f59e0b;
    --vibrant-pink: #ec4899;
}

.hero-section {
    width: 100%;
    padding: 120px 20px 20px;
    /* Increased top padding for navbar clearance */
    text-align: center;
    position: relative;
    z-index: 10;
}

.search-container {
    max-width: 600px;
    margin: 30px auto 40px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 18px 25px 18px 55px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    font-size: 18px;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(16, 185, 129, 0.3);
    margin-bottom: 20px;
    animation: fadeIn 1s ease;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0 40px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 768px) {

    /* Mega Menu Adjustments for Tablet */
    .nav-dropdown .dropdown-content.mega-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transform: none;
        overflow-y: auto;
        display: none;
        z-index: 7000;
    }
}

.tool-card {
    background: white;
    padding: 20px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.tool-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.tool-card:hover .icon {
    transform: scale(1.1) rotate(5deg);
}

.tool-card .tool-card-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1e293b;
}

.tool-card p {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 20px;
}

.tool-card .card-footer {
    margin-top: auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.use-tool-btn {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.tool-card:hover .use-tool-btn {
    text-decoration: underline;
}

.tool-card .badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--vibrant-pink);
    color: white;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-title {
    width: 100%;
    margin: 60px 0 20px;
    font-size: 24px;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 1200px;
}

.category-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

/* Color Themes */
.theme-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.theme-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.theme-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.theme-pink {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .hero-section {
        padding: 60px 20px 20px;
    }

    .category-title {
        padding: 0 20px;
    }

    /* Footer Mobile Responsiveness */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-section {
        grid-column: span 1 !important;
    }

    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
        justify-content: center;
    }

    .social-icons {
        justify-content: center;
        margin-bottom: 15px;
    }

    .footer-section {
        padding: 0 10px;
    }

    .footer-tools-grid a {
        padding: 8px;
        font-size: 13px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 6px;
    }
}