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

:root {
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --secondary: #ec4899;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border: #e5e7eb;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100vw;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.logo i {
    font-size: 1.8rem;
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

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

.mobile-auth-container {
    display: none;
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    border: 2px solid var(--border);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    overflow-x: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(139, 92, 246, 0.1) 0%, 
        rgba(236, 72, 153, 0.1) 50%,
        rgba(59, 130, 246, 0.1) 100%);
    z-index: -1;
}

.hero-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 90%, rgba(59, 130, 246, 0.2) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.1); }
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Hero Chat Box */
.hero-chat-box {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 700px;
    width: 100%;
    margin: 0 auto 2rem;
    box-sizing: border-box;
}

.chat-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 16px;
    transition: border-color 0.3s;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.chat-input-wrapper:focus-within {
    border-color: var(--primary);
}

.attach-btn,
.voice-btn,
.send-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-light);
    transition: all 0.3s;
    padding: 0.5rem;
    border-radius: 8px;
}

.attach-btn:hover,
.voice-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.send-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.send-btn:hover {
    transform: scale(1.05);
}

.hero-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
}

.input-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.action-btn {
    background: var(--bg-light);
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: all 0.3s;
    color: var(--text-dark);
}

.action-btn:hover {
    background: var(--border);
}

.action-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.action-btn.active i {
    color: white;
}

/* Attached File Info */
.attached-file-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--primary);
    width: fit-content;
    max-width: 100%;
}

.attached-file-info .file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.remove-file-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.remove-file-btn:hover {
    color: #ef4444;
}

/* Example Prompts */
.example-prompts {
    margin-top: 2rem;
}

.prompts-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.prompts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    max-width: 700px;
    margin: 0 auto;
}

.prompt-chip {
    background: white;
    border: 2px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.prompt-chip:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.05);
    transform: translateY(-2px);
}

.prompt-chip i {
    color: var(--primary);
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: white;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

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

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

.feature-card {
    padding: 2rem;
    border-radius: 16px;
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.1);
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

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

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

.steps-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

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

/* Showcase */
.showcase {
    padding: 6rem 0;
    background: white;
}

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

.showcase-card {
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.showcase-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.showcase-image {
    height: 200px;
    overflow: hidden;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.showcase-info {
    padding: 1.5rem;
}

.showcase-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.showcase-info p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.showcase-tag {
    display: inline-block;
    background: var(--bg-light);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

/* CTA Section */
.cta {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta .btn-primary {
    background: white;
    color: var(--primary);
}

.cta .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.cta .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

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

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

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

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

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

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

.footer-column h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-column ul {
    list-style: none;
}

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

.footer-column a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: white;
}

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

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}
.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablet (768px – 900px): hide Login, keep Get started) */
@media (max-width: 900px) {
    .nav-actions a.btn-secondary {
        display: none;
    }
    .nav-actions .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* Mobile (≤ 768px) — show ONLY logo + hamburger */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }

    .container {
        padding: 0 16px;
        max-width: 100%;
    }

    /* ---- Navbar: hide everything except logo + hamburger ---- */
    .navbar {
        overflow: visible !important;
    }
    .nav-wrapper {
        position: relative;
    }
    .nav-menu {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 0.5rem 0 1rem;
        border-top: 1px solid var(--border);
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        gap: 0;
        z-index: 1001;
    }
    .nav-menu.mobile-open {
        display: flex;
    }
    .nav-menu li {
        border-bottom: 1px solid var(--border);
    }
    .nav-menu li:last-child {
        border-bottom: none;
    }
    .nav-menu a {
        padding: 1rem 1.5rem;
        display: block;
        width: 100%;
    }
    /* Mobile-only Auth Container */
    .mobile-auth-container {
        display: none;
        flex-direction: column;
        padding: 1rem 1.5rem;
        gap: 0.75rem;
        border-top: 1px solid var(--border) !important;
        background: var(--bg-light);
    }
    .nav-menu.mobile-open .mobile-auth-container {
        display: flex;
    }
    .mobile-auth-container .btn-primary,
    .mobile-auth-container .btn-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
    }
    .mobile-user-info {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 0.5rem;
        font-weight: 600;
        color: var(--text-dark);
    }
    .mobile-logout-link {
        display: flex;
        align-items: center;
        gap: 10px;
        color: #dc2626;
        text-decoration: none;
        font-weight: 600;
        padding: 0.5rem 0;
        transition: opacity 0.2s;
    }
    .mobile-logout-link:hover {
        opacity: 0.8;
    }
    /* HIDE all buttons in nav-actions on mobile */
    .nav-actions {
        display: none !important;
    }
    /* Mobile Overlay */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1000;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .mobile-overlay.active {
        display: block;
        opacity: 1;
    }
    /* SHOW the hamburger button */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        border-radius: 8px;
        background: var(--bg-light);
        font-size: 1.25rem;
        color: var(--text-dark);
        border: 1px solid var(--border);
        cursor: pointer;
        flex-shrink: 0;
        z-index: 1002;
        position: relative;
        -webkit-tap-highlight-color: rgba(139,92,246,0.15);
        touch-action: manipulation;
    }

    /* ---- Hero ---- */
    .hero {
        padding: 6rem 0 3rem;
    }
    .hero-content {
        text-align: center;
    }
    .hero-title {
        font-size: 2rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .hero-badge {
        font-size: 0.85rem;
        white-space: normal;
    }
    .hero-chat-box {
        padding: 1rem;
    }
    .chat-input-wrapper {
        gap: 0.4rem;
        padding: 0.5rem;
    }
    .voice-btn {
        display: none !important;
    }
    .hero-input {
        font-size: 0.9rem;
    }
    .prompts-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    /* ---- Sections ---- */
    .section-header h2 {
        font-size: 1.7rem;
        word-break: break-word;
    }
    .features-grid,
    .showcase-grid {
        grid-template-columns: 1fr;
    }
    .step {
        flex-direction: column;
        gap: 1rem;
    }
    .cta-content h2 {
        font-size: 1.7rem;
    }
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-large {
        width: 100%;
        justify-content: center;
        text-align: center;
        box-sizing: border-box;
    }

    /* ---- Footer ---- */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .footer-column:first-child {
        grid-column: 1 / -1;
    }

    /* ---- Pricing ---- */
    .pricing-hero h1 {
        font-size: 2rem !important;
    }
    .pricing-cards {
        grid-template-columns: 1fr !important;
    }

    /* ---- Tool catalog ---- */
    .multitools-container {
        padding: 80px 16px 40px;
    }
    .multitools-header h1 {
        font-size: 1.7rem;
    }
    .multitools-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    /* ---- Word Counter ---- */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* ---- Tool pages with .uc-top-nav ---- */
    .uc-top-nav {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    .uc-top-nav ul {
        display: none;
    }
}

/* Small phone (≤ 430px) */
@media (max-width: 430px) {
    .hero-title {
        font-size: 1.6rem;
    }
    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
    .prompts-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .multitools-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    .multitools-card-title {
        font-size: 0.85rem;
    }
}

/* Tool Page Specifics */
.tool-page-body {
    background-color: var(--bg-light);
}

.tool-app-container {
    display: flex;
    min-height: 100vh;
    padding-top: 80px; /* offset navbar */
}

/* Sidebar */
.tool-sidebar {
    width: 320px;
    background: white;
    border-right: 1px solid var(--border);
    padding: 2rem;
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    margin-bottom: 2rem;
}

.sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-header p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
}

.color-picker-wrapper input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-wrapper input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.color-hex {
    font-family: monospace;
    font-size: 0.9rem;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

/* Preview Area */
.tool-preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.preview-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.view-toggles {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.25rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.view-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
}

.view-btn.active {
    background: var(--primary);
    color: white;
}

.preview-canvas-wrapper {
    flex: 1;
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYNgfRMPIwMDAxEAEYExQAwYdMGwYDC6QYYbReMAY4oRhMGQ0hLgFAACrEAkHkFzM7QAAAABJRU5ErkJggg==');
    border: 2px dashed var(--border);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: max-width 0.3s;
    margin: 0 auto;
    width: 100%;
}

.preview-canvas {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Custom Component Defaults (used before JS overrides) */
.custom-card {
    background-color: var(--comp-bg, #ffffff);
    color: var(--comp-text, #1f2937);
    border-radius: var(--comp-radius, 16px);
    padding: var(--comp-padding, 24px);
    box-shadow: var(--comp-shadow, 0 10px 20px rgba(0,0,0,0.1));
    max-width: 400px;
    width: 100%;
    transition: all 0.2s;
}

.custom-card .card-icon {
    width: 48px;
    height: 48px;
    background-color: var(--comp-primary, #8b5cf6);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.custom-card .card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.custom-card .card-desc {
    opacity: 0.8;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.custom-card .card-btn {
    background-color: var(--comp-primary, #8b5cf6);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.custom-card .card-btn:hover {
    opacity: 0.9;
}

/* Export Panel */
.export-panel {
    margin-top: 2rem;
    background: #1f2937;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    max-height: 250px;
}

.export-header {
    background: #111827;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #374151;
}

.export-header h3 {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.copy-btn.success {
    background: #10b981;
}

.export-panel pre {
    padding: 1.5rem;
    margin: 0;
    overflow-x: auto;
}

.export-panel code {
    color: #e5e7eb;
    font-family: inherit;
    font-size: 0.9rem;
}

/* Active Nav Update */
.active-nav {
    color: var(--primary) !important;
}

@media (max-width: 900px) {
    .tool-app-container {
        flex-direction: column;
    }

    .tool-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
}

/* Multitools Layout Elements */
.multitools-page-body {
    background-color: #f8fafc; /* Modern soft light-gray background */
}

.multitools-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.multitools-header {
    text-align: center;
    max-width: 800px;
    margin-bottom: 4rem;
}

.multitools-header h1 {
    color: #1e293b; 
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.multitools-header p {
    color: #64748b;
    font-size: 1.25rem;
    line-height: 1.7;
}

.multitools-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
}

@media (max-width: 1100px) {
    .multitools-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 850px) {
    .multitools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 550px) {
    .multitools-grid {
        grid-template-columns: 1fr;
    }
    .multitools-header h1 {
        font-size: 2.5rem;
    }
}

.mt-card {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
}

.mt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s;
}

.mt-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    border-color: transparent;
}

.mt-card:hover::before {
    opacity: 1;
}

.mt-icon {
    width: 64px;
    height: 64px;
    background: #f1f5f9;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: all 0.3s;
}

.mt-card:hover .mt-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    transform: scale(1.1);
}

.mt-card h3 {
    color: #1e293b;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    height: auto;
    display: block;
}

.mt-card p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.mt-btn-wrapper {
    width: 100%;
    margin-top: auto;
}

.mt-btn {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mt-card:hover .mt-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.3);
}

.mt-btn:hover {
    transform: scale(1.02);
}/* Top header styles for all standalone tools matching the screenshot */
.uc-top-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    background: white;
    gap: 1.5rem;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 10;
}
.uc-top-nav a {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
}
.uc-top-nav a:hover {
    color: #2b6cb0;
}
.uc-top-btn {
    background-color: #0066cc;
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
}
.uc-top-btn:hover {
    background-color: #0052a3;
}
