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

html {
    /* Responsive root font size for consistent scaling across screens */
    font-size: clamp(14px, 1.2vw + 8px, 18px);
}

img, video {
    max-width: 100%;
    height: auto;
}

body {
    font-family: 'Inter', 'Noto Sans Kannada', sans-serif;
    background: #000011;
    color: #e0e0e0;
    overflow-x: hidden;
    min-height: 100vh;
    --model-loaded: false;
    transition: color 0.3s, background 0.3s;
}

.fade-in {
    animation: fadeIn 0.5s;
}
.fade-out {
    animation: fadeOut 0.35s forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(74, 20, 140, 0.1) 0%, rgba(0, 0, 0) 70%);
    contain: strict;
}

#loading-status {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    color: #00d4ff;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem 2rem;
    border-radius: 10px;
    border: 1px solid #00d4ff;
    transition: opacity 0.3s ease;
}

#loading-status.hidden {
    opacity: 0;
    pointer-events: none;
}

#tesseract-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100svh;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(0 0 32px #00d4ff66) drop-shadow(0 0 16px #4ecdc466);
    background: transparent;
}


.content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100svh;
    text-align: center;
}

.logo {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 2rem;
    background: linear-gradient(45deg, #00d4ff, #ff6b6b, #4ecdc4);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
    contain: layout style;
}

.tagline {
    font-size: clamp(1rem, 2.2vw, 1.5rem);
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 600px;
    line-height: 1.6;
}

.coming-soon {
    font-size: clamp(1.4rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 2rem;
    color: #00d4ff;
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.language-switcher.corner {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 40;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.lang-btn.active {
    background: #00d4ff;
    border-color: #00d4ff;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0 1rem 0;
}
.main-nav button {
    background: transparent;
    color: #fff;
    border: none;
    padding: 0.7rem 2.2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    text-decoration: none;
}

.main-nav button:hover, .main-nav button.active {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    transform: translateY(-2px);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: #00d4ff;
}

.main-nav button i {
    vertical-align: middle;
    margin-right: 0.5em;
    font-size: 1.2em;
    width: 1.2em;
    height: 1.2em;
    display: inline-block;
}
.main-nav button span {
    vertical-align: middle;
}

.header-bar {
    position: absolute;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
}

/* Mobile menu toggle (hidden by default) */
.mobile-menu-toggle {
    display: none;
    background: rgba(0, 212, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(0, 212, 255, 0.4);
    padding: 0.6rem 1rem;
    border-radius: 999px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.mobile-menu-toggle:hover { background: #00d4ff; transform: translateY(-2px) scale(1.04); }


@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Product Layout Styles */
.product-zigzag {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1200px;
    width: 100%;
    padding: 2rem;
    position: relative;
}

.product-zigzag::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #00d4ff, #4ecdc4, #ff6b6b);
    border-radius: 2px;
    z-index: 1;
}

.product-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 2;
    max-width: 400px;
    margin: 0 auto;
}

.product-item:hover {
    background: rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.product-item h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #00d4ff, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-item p {
    font-size: 1.2rem;
    color: #b0b0b0;
    line-height: 1.6;
}

/* Path connection lines */
.product-item::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #00d4ff;
    border-radius: 50%;
    border: 4px solid #000011;
    z-index: 3;
}

.product-item::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 40px;
    background: linear-gradient(180deg, #00d4ff, transparent);
    z-index: 1;
}

/* Alternate left and right positioning for path effect */
.product-item:nth-child(odd) {
    align-self: flex-start;
    margin-left: 0;
    margin-right: auto;
}

.product-item:nth-child(even) {
    align-self: flex-end;
    margin-left: auto;
    margin-right: 0;
}

/* Connection lines for odd items (left side) */
.product-item:nth-child(odd)::before {
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.product-item:nth-child(odd)::after {
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
}

/* Connection lines for even items (right side) */
.product-item:nth-child(even)::before {
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.product-item:nth-child(even)::after {
    left: -50px;
    top: 50%;
    transform: translateY(-50%);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo {
        font-size: 2.5rem;
    }
    .tagline {
        font-size: 1.2rem;
        padding: 0 1rem;
    }
    .coming-soon {
        font-size: 2rem;
    }
    .language-switcher {
        top: 1rem;
        right: 1rem;
    }
    #canvas-container canvas {
        display: block;
    }
    .header-bar { flex-direction: column; top: 1rem; gap: 0.3rem; }
    .mobile-menu-toggle { display: inline-flex; align-items: center; gap: 0.4rem; }
    .main-nav { flex-direction: column; gap: 0.5rem; margin: 0.5rem 0 0 0; display: none; width: 100%; }
    .main-nav.open { display: flex; }
    .product-zigzag {
        padding: 1rem;
        gap: 2rem;
    }
    
    .product-item {
        max-width: 100%;
        padding: 1.5rem;
    }
    
    .product-item h2 {
        font-size: 2rem;
    }
    
    .product-item p {
        font-size: 1rem;
    }
    
    /* Hide connection lines on mobile for cleaner look */
    .product-item::before,
    .product-item::after {
        display: none;
    }
    
    .product-zigzag::before {
        display: none;
    }
}

/* Ensure mobile menu hide/show wins over later rules */
@media (max-width: 768px) {
    .header-bar .main-nav { display: none !important; width: 100%; flex-direction: column; gap: 0.5rem; margin: 0.5rem 0 0 0; }
    .header-bar .main-nav.open { display: flex !important; }
}

/* AI Page Styles */
.ai-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    min-height: 100vh;
    padding-top: 8rem;
    padding-bottom: 4rem;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    overflow-x: hidden;
    width: 100%;
}

.ai-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

body::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Header Bar for AI Page */
.header-bar {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.main-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.main-nav button {
    background: transparent;
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    text-decoration: none;
}

.main-nav button:hover {
    background: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    transform: translateY(-2px);
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: #00d4ff;
}

.main-nav button i {
    width: 1.2rem;
    height: 1.2rem;
}

/* Language Switcher for AI Page */
.language-switcher.corner {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    gap: 0.5rem;
}

.language-switcher.corner .lang-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.language-switcher.corner .lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.language-switcher.corner .lang-btn.active {
    background: #00d4ff;
    border-color: #00d4ff;
}

.ai-content h1 {
    font-size: 3rem;
    margin-bottom: 3rem;
    text-align: center;
    background: linear-gradient(45deg, #00d4ff, #ff6b6b, #4ecdc4);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

.ai-content h2 {
    font-size: 2.5rem;
    margin: 3rem 0 2rem 0;
    color: #00d4ff;
}

.ai-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #4ecdc4;
}

.ai-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: #e0e0e0;
}

.ai-content #ai-subtitle {
    font-size: 1.3rem;
    color: #888;
    margin-bottom: 3rem;
    text-align: center;
}

/* AI Features Section */
.ai-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.ai-feature-card {
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.ai-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.6);
}

.feature-icon {
    font-size: 3rem;
    color: #00d4ff;
    margin-bottom: 1.5rem;
}

.feature-btn {
    background: linear-gradient(45deg, #00d4ff, #4ecdc4);
    border: none;
    color: #000;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.feature-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

/* AI Models Section */
.ai-models {
    margin: 2rem 0 4rem 0;
    width: 100%;
    max-width: 100%;
}

.model-cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    grid-auto-rows: 1fr;
}

.model-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    height: 100%;
    margin: 0;
    box-shadow: 0 4px 20px rgba(78, 205, 196, 0.1);
    overflow: hidden;
    box-sizing: border-box;
    max-width: 100%;
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(78, 205, 196, 0.2);
    border-color: rgba(78, 205, 196, 0.6);
}

.model-icon {
    font-size: 3rem;
    color: #4ecdc4;
    margin-bottom: 1.5rem;
}

.model-content {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.model-content h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #4ecdc4;
    word-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
}

.model-content ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    flex: 1;
    margin-bottom: 0;
}

.model-content p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #e0e0e0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

.model-content li {
    padding: 0.5rem 0;
    color: #ccc;
    position: relative;
    padding-left: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.model-content li::before {
    content: "•";
    color: #4ecdc4;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* AI Demo Section */
.ai-demo {
    margin: 4rem 0;
}

.demo-container {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.chat-interface {
    max-width: 600px;
    margin: 0 auto;
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.3);
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.chat-messages::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.message {
    margin: 0.5rem 0;
    padding: 0.8rem;
    border-radius: 10px;
    max-width: 80%;
}

.user-message {
    background: rgba(255, 107, 107, 0.3);
    color: #fff;
    margin-left: auto;
    text-align: right;
}

.bot-message {
    background: rgba(78, 205, 196, 0.3);
    color: #fff;
    margin-right: auto;
}

.chat-input {
    display: flex;
    gap: 1rem;
}

.chat-input input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 1rem;
}

.chat-input input::placeholder {
    color: #888;
}

.chat-input button {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border: none;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-input button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

/* Responsive Design for AI Page */
@media (max-width: 768px) {
    .ai-content {
        padding: 1rem;
        padding-top: 6rem;
    }
    
    .ai-content h1 {
        font-size: 2rem;
    }
    
    .ai-content h2 {
        font-size: 1.8rem;
    }
    
    .ai-content h3 {
        font-size: 1.4rem;
    }
    
    .ai-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .model-cards-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
    }
    
    .model-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        height: auto;
        min-height: fit-content;
    }
    
    .model-icon {
        font-size: 2.5rem;
    }
    
    .chat-input {
        flex-direction: column;
    }
    
    .chat-input button {
        width: 100%;
    }
    
    .header-bar {
        top: 1rem;
    }
    
    .language-switcher.corner {
        top: 1rem;
        right: 1rem;
    }
    
    .main-nav {
        gap: 0.5rem;
    }
    
    .main-nav button {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}
