/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;
    --secondary: #3b82f6;
    --bg-dark: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --neon-glow: 0 0 20px rgba(37, 99, 235, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-sans);
}

html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
}

/* Background animated elements */
.bg-ambient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blur-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.25;
}

.circle-1 {
    top: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--primary) 0%, transparent 80%);
    animation: pulse 12s infinite alternate;
}

.circle-2 {
    bottom: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 80%);
    animation: pulse 16s infinite alternate-reverse;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); opacity: 0.2; }
    100% { transform: scale(1.15) translate(50px, -50px); opacity: 0.35; }
}

/* Glassmorphism generic style */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.45);
}

/* Buttons */
.btn-grad {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 28px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-grad:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 12px;
    padding: 12px 28px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #fff 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 24px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
}

.nav-link:hover, .nav-item:hover .nav-link {
    color: #fff;
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(15px);
    width: 850px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    backdrop-filter: blur(20px);
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1010;
}

.nav-item:hover .mega-menu {
    display: grid;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.mega-col h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-left: 3px solid var(--primary);
    padding-left: 8px;
}

.mega-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mega-col a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    transition: all 0.3s ease;
    display: block;
}

.mega-col a:hover {
    color: var(--secondary);
    transform: translateX(4px);
}

/* Hamburger & Mobile Menu */
.hamburger {
    display: none;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
}

/* Hero Section */
.hero {
    max-width: 1300px;
    margin: 0 auto;
    padding: 80px 24px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

.hero-text h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}

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

.hero-text p {
    color: var(--text-muted);
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 600px;
}

.search-container {
    max-width: 500px;
    position: relative;
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    padding: 16px 20px;
    padding-right: 50px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(30, 41, 59, 0.6);
    color: #fff;
    outline: none;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
}

.search-container i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* 3D Visualizer */
.hero-visuals {
    display: flex;
    justify-content: center;
    position: relative;
    height: 400px;
}

.scene-3d {
    position: relative;
    width: 300px;
    height: 300px;
    perspective: 1000px;
    animation: float 6s ease-in-out infinite;
}

.card-3d {
    width: 100%;
    height: 100%;
    position: absolute;
    transform-style: preserve-3d;
    animation: spin3d 20s linear infinite;
}

.icon-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, rgba(15,23,42,0.8) 100%);
    border: 2px solid var(--primary);
    box-shadow: 0 0 30px rgba(37, 99, 235, 0.4);
}

.face-hindi { transform: rotateY(0deg) translateZ(100px); color: #fff; }
.face-kb { transform: rotateY(120deg) translateZ(100px); color: var(--secondary); }
.face-trans { transform: rotateY(240deg) translateZ(100px); color: #10b981; }

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

@keyframes spin3d {
    0% { transform: rotateY(0deg) rotateX(10deg); }
    100% { transform: rotateY(360deg) rotateX(10deg); }
}

/* Grid & Dashboard layout */
.section-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 60px 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-muted);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.tool-card {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-decoration: none;
    color: inherit;
}

.tool-icon-wrapper {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--secondary);
    transition: all 0.3s ease;
}

.tool-card:hover .tool-icon-wrapper {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1) rotate(5deg);
}

/* Interactive Workspace / Typing Area */
.workspace-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.typing-area-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
}

.textarea-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.typing-input {
    width: 100%;
    height: 280px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    font-size: 20px;
    color: #fff;
    outline: none;
    resize: vertical;
    transition: border 0.3s ease;
}

.typing-input:focus {
    border-color: var(--primary);
    box-shadow: var(--neon-glow);
}

.suggestions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    min-height: 38px;
}

.suggestion-chip {
    padding: 8px 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.suggestion-chip:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.actions-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-group {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.05);
}

.action-btn.active {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    animation: pulsesound 1.5s infinite;
}

@keyframes pulsesound {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
    100% { transform: scale(1); }
}

/* Footer styling */
.footer {
    border-top: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    padding: 80px 24px 30px;
}

.footer-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 30px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 14.5px;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: #fff;
    transform: translateY(-3px);
}

.social-icon.fb:hover { background: #1877f2; border-color: #1877f2; }
.social-icon.tw:hover { background: #000; border-color: #444; }
.social-icon.ig:hover { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); border-color: transparent; }
.social-icon.yt:hover { background: #ff0000; border-color: #ff0000; }

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14.5px;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 4px;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-input {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    padding: 12px;
    border-radius: 8px;
    color: #fff;
    outline: none;
}

.newsletter-btn {
    background: var(--primary);
    border: none;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.newsletter-btn:hover {
    background: var(--secondary);
}

.footer-bottom {
    max-width: 1300px;
    margin: 0 auto;
    border-top: 1px solid var(--glass-border);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-bottom-links a:hover {
    color: #fff;
}

/* ==========================================
   Ultimate Premium Mobile-Responsive Rules
   ========================================== */

/* Tablet & Smaller Screens styling */
@media (max-width: 1024px) {
    .mega-menu {
        width: 90vw;
        max-width: 750px;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 50px 20px;
        gap: 30px;
    }
    .hero-text p {
        margin: 0 auto 20px;
    }
    .search-container {
        margin: 0 auto 20px;
    }
    .hero-visuals {
        height: 280px;
    }
}

/* Mobile Drawer & Touch Layouts (under 991px) */
@media (max-width: 991px) {
    .hamburger {
        display: block !important;
        z-index: 1015;
        font-size: 24px;
        color: #fff;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .hamburger.active i::before {
        content: "\f00d"; /* FontAwesome Xmark key code */
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        transform: translateX(100%);
        visibility: hidden;
        width: 320px;
        height: 100vh;
        background: rgba(15, 23, 42, 0.98) !important;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 100px 30px 40px !important;
        gap: 15px;
        overflow-y: auto;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
        z-index: 1005;
        box-shadow: -10px 0 35px rgba(0,0,0,0.6);
        display: flex !important; /* Always flex but hidden off-screen */
    }
    
    .nav-menu.active {
        transform: translateX(0) !important;
        visibility: visible !important;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        width: 100%;
        justify-content: space-between;
        font-size: 16px;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        color: #f8fafc;
    }
    
    .mega-menu {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        grid-template-columns: 1fr !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        display: none; /* Triggered dynamically by click toggles */
        background: rgba(255, 255, 255, 0.02) !important;
        padding: 15px !important;
        border-radius: 8px;
        margin-top: 5px;
        gap: 15px !important;
        border: 1px solid var(--glass-border) !important;
    }
    
    .nav-item.active-dropdown .mega-menu {
        display: grid !important;
    }
    
    .nav-item.active-dropdown .nav-link i.fa-chevron-down {
        transform: rotate(180deg);
    }
}

/* Smartphone Screens (under 768px) */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 28px;
    }
    .hero-text h1 {
        font-size: 38px;
    }
    .hero-text p {
        font-size: 15.5px;
    }
    .tools-grid {
        grid-template-columns: 1fr;
    }
    .footer {
        padding: 50px 20px 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .footer-bottom-links {
        justify-content: center;
    }
    .newsletter-form {
        flex-direction: column;
    }
    
    /* Core Typing / Translation tools styling for small mobile */
    .typing-input {
        height: 200px !important;
        font-size: 17px !important;
        padding: 12px !important;
    }
    
    .glass-panel {
        border-radius: 12px;
    }
    
    /* Alert bar adjust */
    #charLimitBar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        align-items: center;
    }
}
