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

html { overflow-x: hidden; }
body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    background: #f8fafc;
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(34, 211, 238, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #1e293b;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 40px auto;
    padding: 40px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: all 1s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    z-index: 1;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: -1;
}

.container.active-container {
    opacity: 1;
    transform: none;
}

header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 2;
}

.container.active-container header {
    animation: slideDown 0.8s ease-out forwards;
}

h1 {
    font-size: 3.5em;
    background: linear-gradient(to right, #818cf8, #c084fc, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    font-weight: 800;
    letter-spacing: -1px;
    filter: drop-shadow(0 0 20px rgba(129, 140, 248, 0.3));
}

.tagline {
    color: #94a3b8;
    font-size: 1.2em;
    font-weight: 300;
}

nav {
    background: rgba(255, 255, 255, 0.8);
    padding: 8px;
    border-radius: 100px;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0 auto 40px;
    width: fit-content;
    border: 1px solid rgba(203, 213, 225, 0.5);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: visible;
}

.container.active-container nav {
    animation: fadeIn 0.8s ease-out 0.3s forwards;
}

.nav-btn {
    padding: 12px 30px;
    background: transparent;
    color: #64748b;
    border: none;
    border-radius: 100px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.nav-btn:hover {
    color: #334155;
}

.nav-btn.active {
    color: white;
}

.nav-indicator {
    position: absolute;
    height: calc(100% - 16px);
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 100px;
    z-index: 0;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: slideUpFade 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.content-card {
    background: rgba(255, 255, 255, 0.8);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.content-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
}

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

.feature-card {
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.feature-card h3 {
    color: #4f46e5;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.feature-card p {
    color: #94a3b8;
    line-height: 1.6;
}

.upload-area {
    border: 2px dashed rgba(99, 102, 241, 0.2);
    border-radius: 24px;
    padding: 60px;
    text-align: center;
    background: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.dragover {
    background: rgba(99, 102, 241, 0.05);
    border-color: #818cf8;
    transform: scale(1.01);
}

input[type="file"] {
    display: none;
}

.btn {
    padding: 16px 45px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 30px;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
    filter: brightness(1.1);
}

.btn:disabled {
    background: #334155;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid #6366f1;
    color: #6366f1;
    margin-left: 15px;
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-3px);
}

.loader {
    display: none;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-top: 4px solid #818cf8;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

.loader.active {
    display: block;
}

.insight-card {
    background: rgba(255, 255, 255, 0.6);
    color: #334155;
    padding: 25px;
    border-radius: 16px;
    margin: 15px 0;
    border-left: 4px solid #818cf8;
    border: 1px solid rgba(203, 213, 225, 0.5);
    border-left-width: 4px;
    transition: transform 0.3s ease;
}

.insight-card:hover {
    transform: translateX(10px);
    background: rgba(255, 255, 255, 0.9);
}

.chart-container {
    background: rgba(255, 255, 255, 0.5);
    padding: 25px;
    border-radius: 20px;
    margin: 30px 0;
    border: 1px solid rgba(203, 213, 225, 0.5);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-box {
    background: rgba(255, 255, 255, 0.6);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(203, 213, 225, 0.5);
    transition: transform 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(139, 92, 246, 0.3);
}

.stat-value {
    font-size: 2.5em;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.stat-label {
    color: #94a3b8;
    margin-top: 5px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
    border: 1px solid rgba(239, 68, 68, 0.2);
    animation: fadeIn 0.3s ease-in;
}

.success {
    background: rgba(34, 197, 94, 0.1);
    color: #86efac;
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
    border: 1px solid rgba(34, 197, 94, 0.2);
    animation: fadeIn 0.3s ease-in;
}

.prediction-item {
    background: rgba(255, 255, 255, 0.6);
    color: #334155;
    padding: 20px;
    border-radius: 12px;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(203, 213, 225, 0.5);
    transition: all 0.3s ease;
}

.prediction-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
    border-color: #c084fc;
}

.select-wrapper {
    position: relative;
    width: 100%;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 15px;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236366f1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.2s ease-in-out;
    pointer-events: none;
}

.select-wrapper.is-open::after {
    transform: translateY(-50%) rotate(180deg);
}

.control-select {
    width: 100%;
    padding: 12px;
    padding-right: 40px;
    border-radius: 10px;
    border: 1px solid rgba(203, 213, 225, 0.8);
    background: rgba(255, 255, 255, 0.9);
    color: #334155;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
}

canvas {
    max-width: 100%;
    height: auto;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    margin-top: 20px;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

th {
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 1px;
    padding: 15px;
    text-align: left;
}

td {
    background: rgba(255, 255, 255, 0.6);
    padding: 15px;
    color: #334155;
}

tr td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    font-weight: 600;
    color: #4f46e5;
}

tr td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.9);
}

/* Intro Overlay */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8fafc;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #1e293b;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), border-radius 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

#intro-overlay.hidden {
    transform: translateY(-100%);
    border-radius: 0 0 50% 50%;
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

.intro-content {
    text-align: center;
    z-index: 1;
}

.intro-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #818cf8, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: slideDown 1s ease-out;
}

.intro-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #94a3b8;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.5s forwards;
}

.start-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    opacity: 0;
    animation: zoomIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 1s forwards;
}

.start-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* Background Particles */
.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    z-index: 0;
}

.circles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(99, 102, 241, 0.1);
    animation: animate 25s linear infinite;
    bottom: -150px;
}

.circles li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.circles li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.circles li:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.circles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.circles li:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.circles li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.circles li:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
}

.circles li:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
}

.circles li:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 35s;
}

.circles li:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 11s;
}

/* Live Stats & Footer */
.live-stats-container {
    display: flex;
    justify-content: space-around;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 30px;
}

.stat-item {
    text-align: center;
    opacity: 0;
    animation: slideUpFade 0.5s ease-out forwards;
}

.counter {
    font-size: 3em;
    font-weight: 800;
    background: linear-gradient(to right, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

footer {
    text-align: center;
    padding: 30px;
    color: #94a3b8;
    font-size: 0.9em;
}

/* Footer Social Icons */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 25px;
}

.social-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #64748b;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
    animation: float 3s ease-in-out infinite;
}

.social-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    z-index: 2;
    transition: all 0.3s ease;
}

.social-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    top: 0;
    left: 0;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

.social-icon:hover {
    transform: translateY(-5px);
    color: white;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    animation-play-state: paused;
}

.social-icon:hover::after {
    transform: scale(1);
}

/* Brand Colors for Social Icons */
.social-icon.linkedin:hover::after { background: #0077b5; }
.social-icon.github:hover::after { background: #333; }
.social-icon.whatsapp:hover::after { background: #25D366; }
.social-icon.instagram:hover::after { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }

/* New Enterprise Sections */
.integration-item {
    font-size: 1.1em;
    font-weight: 600;
    color: #64748b;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    border: 1px solid rgba(203, 213, 225, 0.5);
    transition: all 0.3s ease;
    cursor: default;
    display: flex;
    align-items: center;
    gap: 10px;
}

.integration-item:hover {
    transform: translateY(-5px);
    background: white;
    color: #4f46e5;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.15);
    border-color: #818cf8;
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 20px;
    font-size: 1.4em;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* Keyframes */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 0;
    }

    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

/* --- Professional Dynamic Animations --- */

/* Page Entrance */
.page.active {
    animation: pageFadeIn 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes pageFadeIn {
    0% { opacity: 0; transform: translateY(15px); filter: blur(5px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.page.active.swipe-right {
    animation: slideInFromRight 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.page.active.swipe-left {
    animation: slideInFromLeft 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes slideInFromRight {
    0% { opacity: 0; transform: translateX(60px); filter: blur(5px); }
    100% { opacity: 1; transform: translateX(0); filter: blur(0); }
}

@keyframes slideInFromLeft {
    0% { opacity: 0; transform: translateX(-60px); filter: blur(5px); }
    100% { opacity: 1; transform: translateX(0); filter: blur(0); }
}

/* Card Animations & Hover */
.content-card {
    animation: cardEntrance 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s backwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
}

@keyframes cardEntrance {
    0% { opacity: 0; transform: translateY(30px) scale(0.98); filter: blur(10px); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* Button Dynamics */
.btn,
.nav-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(99, 102, 241, 0.4);
}

.btn:active {
    transform: scale(0.98);
}

/* Nav Button Active State */
.nav-btn.active {
    background: none;
    color: white;
    box-shadow: none;
    transform: scale(1);
}

/* Feature & Stat Cards Staggered Entrance */
.feature-card,
.stat-box,
.insight-card {
    opacity: 0;
    animation: slideUpFade 0.5s ease-out forwards;
    /* Unified transition for a smoother hover effect on all properties */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.feature-card:hover,
.stat-box:hover,
.insight-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
    background: linear-gradient(to bottom right, #ffffff, #f8fafc);
}

/* Stagger Delays */
.feature-grid>div:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-grid>div:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-grid>div:nth-child(3) {
    animation-delay: 0.3s;
}

.feature-grid>div:nth-child(4) {
    animation-delay: 0.4s;
}

/* Stagger for live stats under Welcome section */
#home .live-stats-container .stat-item:nth-child(1) { animation-delay: 0.5s; }
#home .live-stats-container .stat-item:nth-child(2) { animation-delay: 0.6s; }
#home .live-stats-container .stat-item:nth-child(3) { animation-delay: 0.7s; }

.stats-grid>div {
    animation-delay: 0.2s;
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(20px); filter: blur(5px); }
    100% { opacity: 1; transform: translateY(0); filter: blur(0); }
}

/* Upload Area Pulse */
.upload-area:hover {
    animation: pulseBorder 2s infinite;
    background-color: rgba(99, 102, 241, 0.05);
}

@keyframes pulseBorder {
    0% {
        border-color: #cbd5e1;
    }

    50% {
        border-color: #6366f1;
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0.1);
    }

    100% {
        border-color: #cbd5e1;
    }
}

/* --- New Dynamic Animations --- */

/* Floating Animation */
.floating {
    animation: float 3s ease-in-out infinite;
}

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

/* Architecture Diagram */
.architecture-diagram {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.arch-node {
    background: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid #e2e8f0;
    width: 120px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s, border-color 0.3s;
}

.arch-node:hover {
    transform: translateY(-5px);
    border-color: #818cf8;
}

.arch-node.active {
    border-color: #6366f1;
    animation: pulseNode 2s infinite;
}

.arch-node.success {
    border-color: #10b981;
    color: #059669;
}

.arch-arrow {
    font-size: 1.5em;
    color: #94a3b8;
    animation: slideArrow 1s ease-in-out infinite alternate;
}

@keyframes pulseNode {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

@keyframes slideArrow {
    from { transform: translateX(-3px); opacity: 0.6; }
    to { transform: translateX(3px); opacity: 1; }
}

/* Column Insights Section */
#columnInsightsSection {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 15px;
}

#columnInsightsSection .select-wrapper {
    margin: 15px 0;
}

#columnStatsDisplay {
    margin-top: 10px;
}

#predictionControls {
    margin-top: 20px;
    text-align: left;
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: 15px;
}

#columnStatsDisplay .stat-box {
    padding: 15px;
}

#columnStatsDisplay .stat-value {
    font-size: 1.5em;
}

@keyframes slideArrowMobile {
    from { transform: rotate(90deg) translateX(-3px); opacity: 0.6; }
    to { transform: rotate(90deg) translateX(3px); opacity: 1; }
}

/* --- Scroll-triggered Animations --- */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}

.animate-on-scroll.animate-fade-in-up {
    transform: translateY(30px);
}

.animate-on-scroll.animate-fade-in-left {
    transform: translateX(-40px);
}

.animate-on-scroll.animate-fade-in-right {
    transform: translateX(40px);
}

.animate-on-scroll.animate-zoom-in {
    transform: scale(0.95);
}


/* MOBILE RESPONSIVE - COMPLETE FIX */

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    z-index: 1001;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    width: 22px;
    height: 2.5px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .container {
        margin: 15px;
        padding: 20px 15px;
    }

    header {
        margin-bottom: 30px;
    }

    h1 {
        font-size: 2em;
    }

    .tagline {
        font-size: 0.95em;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 20px 20px;
        gap: 12px;
        border-radius: 0;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        max-width: none;
        border: none;
        margin: 0;
    }

    nav.mobile-open {
        right: 0;
    }

    .nav-btn {
        width: 100%;
        padding: 15px 20px;
        font-size: 1em;
        text-align: left;
        border-radius: 12px;
        color: #334155;
        background: transparent;
    }

    .nav-btn:hover {
        background: rgba(99, 102, 241, 0.1);
    }

    .nav-btn.active {
        background: linear-gradient(135deg, #6366f1, #8b5cf6);
        color: white;
    }

    .nav-indicator {
        display: none;
    }
    .tagline{
        display: none;
    }

    .content-card {
        padding: 20px 15px;
        border-radius: 15px;
    }
    .content-card h2{
        padding-bottom: 20px;
    }
    .content-card > p {
        text-align: justify;
    }

    .feature-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .feature-card {
        padding: 20px;
    }

    .live-stats-container {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        background: rgba(248, 242, 242, 0.5);
        border-radius: 15px;
    }

    .counter {
        font-size: 2.5em;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 1em;
        margin-top: 15px;
    }

    .btn-outline {
        margin-left: 0;
        margin-top: 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .architecture-diagram {
        flex-direction: column;
        gap: 10px;
    }

    .arch-arrow {
        animation: slideArrowMobile 1s ease-in-out infinite alternate;
    }
    
    .social-icon:nth-child(1) { animation-delay: 0s; }
    .social-icon:nth-child(2) { animation-delay: 0.2s; }
    .social-icon:nth-child(3) { animation-delay: 0.4s; }
    .social-icon:nth-child(4) { animation-delay: 0.6s; }

    .arch-node {
        width: 100px;
        padding: 15px;
    }

    #columnInsightsSection {
        padding: 15px;
        width: 100%;
        margin-bottom: 20px;
    }

    #columnInsightsSection h3 {
        font-size: 1.1em;
        margin-bottom: 15px;
        color: #334155;
    }

    #columnInsightsSection .select-wrapper {
        width: 100%;
        margin: 15px 0;
    }

    #columnInsightsSection .control-select {
        padding: 14px 40px 14px 14px;
        font-size: 16px;
        min-height: 48px;
        border: 2px solid rgba(99, 102, 241, 0.3);
        background: white;
    }

    #columnStatsDisplay {
        margin-top: 15px;
    }

    #columnStatsDisplay .stat-box {
        padding: 15px;
        margin-bottom: 10px;
    }

    #predictionControls {
        padding: 15px;
    }

    #predictionControls > div {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .select-wrapper {
        max-width: 100%;
    }

    .control-select {
        font-size: 16px; /* Prevent zoom on iOS */
        max-width: 100%;
        text-overflow: ellipsis;
    }

    .intro-title {
        font-size: 2.5rem;
    }

    .intro-subtitle {
        font-size: 1.1rem;
        padding: 0 20px;
    }

    .start-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    table {
        font-size: 0.85em;
    }

    th, td {
        padding: 10px 8px;
    }

    #predictionControls > div {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .step-number {
        width: 45px;
        height: 45px;
        font-size: 1.2em;
    }

    footer {
        font-size: 0.8em;
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 10px;
        padding: 15px 10px;
    }

    h1 {
        font-size: 1.6em;
    }

    .tagline {
        font-size: 0.85em;
    }

    .content-card {
        padding: 15px 10px;
    }

    .feature-card h3 {
        font-size: 1.2em;
    }

    .stat-value {
        font-size: 2em;
    }

    .counter {
        font-size: 2em;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .upload-area h3 {
        font-size: 1.2em;
    }

    .btn {
        padding: 12px 16px;
        font-size: 0.95em;
    }

    #columnInsightsSection {
        padding: 12px;
    }

    #columnInsightsSection h3 {
        font-size: 1em;
        margin-bottom: 12px;
    }

    #columnInsightsSection .control-select {
        padding: 12px 36px 12px 12px;
        font-size: 16px;
        min-height: 44px;
    }

    #columnStatsDisplay .stat-box {
        padding: 12px;
    }

    #columnStatsDisplay .stat-value {
        font-size: 1.3em;
    }

    #columnStatsDisplay .stat-label {
        font-size: 0.8em;
    }

    .chart-container {
        padding: 15px;
        margin: 20px 0;
    }

    .chart-container canvas {
        height: 250px !important;
        width: 100% !important;
    }


}


/* PRINT / PDF STYLES */
@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    body {
        background: white !important;
        color: #000 !important;
    }

    .container {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 20px !important;
        background: white !important;
        box-shadow: none !important;
        border: none !important;
    }

    header {
        margin-bottom: 30px !important;
        page-break-after: avoid !important;
    }

    h1 {
        color: #6366f1 !important;
        font-size: 2.5em !important;
        margin-bottom: 10px !important;
    }

    h2 {
        color: #334155 !important;
        font-size: 1.8em !important;
        margin-top: 20px !important;
        page-break-after: avoid !important;
    }

    h3 {
        color: #4f46e5 !important;
        font-size: 1.3em !important;
        page-break-after: avoid !important;
    }

    .tagline {
        color: #64748b !important;
        font-size: 1.1em !important;
    }

    nav, .mobile-menu-toggle, #intro-overlay, footer {
        display: none !important;
    }

    .page {
        display: block !important;
    }

    .page:not(#dashboard):not(#predictions) {
        display: none !important;
    }

    .content-card {
        background: white !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 10px !important;
        padding: 20px !important;
        margin-bottom: 20px !important;
        page-break-inside: avoid !important;
        box-shadow: none !important;
    }

    .feature-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        page-break-inside: avoid !important;
    }

    .feature-card {
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        padding: 15px !important;
        border-radius: 8px !important;
        page-break-inside: avoid !important;
    }

    .feature-card h3 {
        color: #4f46e5 !important;
        margin-bottom: 8px !important;
    }

    .feature-card p {
        color: #475569 !important;
        line-height: 1.5 !important;
    }

    .stats-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
        margin: 20px 0 !important;
        page-break-inside: avoid !important;
    }

    .stat-box {
        background: #f1f5f9 !important;
        border: 1px solid #cbd5e1 !important;
        padding: 15px !important;
        text-align: center !important;
        border-radius: 8px !important;
    }

    .stat-value {
        color: #6366f1 !important;
        font-size: 2em !important;
        font-weight: bold !important;
    }

    .stat-label {
        color: #64748b !important;
        font-size: 0.9em !important;
        margin-top: 5px !important;
    }

    .insight-card {
        background: #fefce8 !important;
        border-left: 4px solid #6366f1 !important;
        padding: 15px !important;
        margin: 10px 0 !important;
        border-radius: 5px !important;
        page-break-inside: avoid !important;
    }

    .insight-card h3, .insight-card h4 {
        color: #334155 !important;
        margin-bottom: 8px !important;
    }

    .insight-card p {
        color: #475569 !important;
        line-height: 1.5 !important;
    }

    .prediction-item {
        background: #f8fafc !important;
        border: 1px solid #cbd5e1 !important;
        padding: 12px !important;
        margin: 8px 0 !important;
        display: flex !important;
        justify-content: space-between !important;
        border-radius: 5px !important;
    }

    .prediction-item strong {
        color: #6366f1 !important;
        font-weight: bold !important;
    }

    table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin: 15px 0 !important;
        page-break-inside: auto !important;
    }

    th {
        background: #f1f5f9 !important;
        color: #334155 !important;
        font-weight: bold !important;
        padding: 10px !important;
        border: 1px solid #cbd5e1 !important;
        text-align: left !important;
    }

    td {
        background: white !important;
        color: #475569 !important;
        padding: 10px !important;
        border: 1px solid #e2e8f0 !important;
    }

    tr {
        page-break-inside: avoid !important;
    }

    .chart-container {
        background: white !important;
        border: 1px solid #e2e8f0 !important;
        padding: 15px !important;
        margin: 15px 0 !important;
        border-radius: 8px !important;
        page-break-inside: avoid !important;
    }

    canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    .btn {
        display: none !important;
    }

    .live-stats-container {
        display: flex !important;
        justify-content: space-around !important;
        margin: 20px 0 !important;
        page-break-inside: avoid !important;
    }

    .stat-item {
        text-align: center !important;
    }

    .counter {
        color: #6366f1 !important;
        font-size: 2.5em !important;
        font-weight: bold !important;
    }

    .architecture-diagram {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
        margin: 20px 0 !important;
        page-break-inside: avoid !important;
    }

    .arch-node {
        background: #f8fafc !important;
        border: 2px solid #cbd5e1 !important;
        padding: 15px !important;
        border-radius: 10px !important;
        text-align: center !important;
    }

    .arch-arrow {
        color: #6366f1 !important;
        font-size: 1.5em !important;
    }

    @page {
        margin: 1.5cm;
        size: A4;
    }

    .page-break {
        page-break-before: always !important;
    }

    #dashboardContent, #predictionsContent {
        display: block !important;
    }
}
