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

:root {
    --primary: #0a0a15;
    --secondary: #1a1a2e;
    --accent: #e94560;
    --accent-light: #ff6b9d;
    --text: #eee;
    --text-dim: #a0a0a0;
}

body {
    font-family: 'Work Sans', sans-serif;
    background: linear-gradient(135deg, #0a0a15 0%, #1a1a2e 50%, #16213e 100%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 60px 30px;
    position: relative;
    z-index: 1;
}

/* Floating tech background */
.tech-float {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.tech-item {
    position: absolute;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.18);
    text-shadow: 0 0 18px rgba(233, 69, 96, 0.45), 0 0 30px rgba(255, 107, 157, 0.25);
    animation: techDrift 14s ease-in-out infinite;
    opacity: 0.28;
}

.tech-item.t1 { left: 4%; top: 12%; font-size: 64px; animation-duration: 16s; }
.tech-item.t2 { left: 10%; top: 70%; font-size: 42px; animation-duration: 18s; animation-delay: 1s; }
.tech-item.t3 { left: 16%; top: 38%; font-size: 48px; animation-duration: 15s; animation-delay: 0.4s; }
.tech-item.t4 { right: 6%; top: 18%; font-size: 44px; animation-duration: 17s; animation-delay: 0.8s; }
.tech-item.t5 { right: 12%; top: 62%; font-size: 40px; animation-duration: 19s; animation-delay: 1.2s; }
.tech-item.t6 { right: 18%; top: 36%; font-size: 36px; animation-duration: 13s; animation-delay: 0.2s; }
.tech-item.t7 { left: 28%; top: 14%; font-size: 28px; animation-duration: 12s; animation-delay: 1.5s; }
.tech-item.t8 { left: 32%; top: 78%; font-size: 22px; animation-duration: 20s; animation-delay: 0.6s; }
.tech-item.t9 { right: 28%; top: 12%; font-size: 30px; animation-duration: 16s; animation-delay: 0.9s; }
.tech-item.t10 { right: 30%; top: 72%; font-size: 26px; animation-duration: 18s; animation-delay: 0.3s; }
.tech-item.t11 { left: 46%; top: 8%; font-size: 26px; animation-duration: 14s; animation-delay: 1.1s; }
.tech-item.t12 { right: 44%; top: 82%; font-size: 24px; animation-duration: 21s; animation-delay: 1.4s; }

.tech-laptop {
    right: 6%;
    top: 44%;
    width: 140px;
    height: 90px;
    stroke: rgba(255, 107, 157, 0.65);
    fill: none;
    stroke-width: 2;
    opacity: 0.4;
    filter: drop-shadow(0 0 16px rgba(255, 107, 157, 0.35));
    animation-duration: 22s;
}

@keyframes techDrift {
    0%, 100% { transform: translate(0, 0) rotate(0deg); opacity: 0.25; }
    50% { transform: translate(12px, -10px) rotate(2deg); opacity: 0.5; }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 80px;
    animation: fadeInDown 0.8s ease-out;
}

.header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 72px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent-light), #ffa07a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.header p {
    font-size: 20px;
    color: var(--text-dim);
    font-weight: 300;
    letter-spacing: 0.5px;
}

.linkedin-link {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(233, 69, 96, 0.12);
    border: 1px solid rgba(233, 69, 96, 0.35);
    animation: linkGlow 2.6s ease-in-out infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.linkedin-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(233, 69, 96, 0.35);
}

.linkedin-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(10, 102, 194, 0.2);
    border: 1px solid rgba(10, 102, 194, 0.45);
    padding: 2px;
}

.linkedin-icon svg {
    width: 12px;
    height: 12px;
    fill: #0a66c2;
}

@keyframes linkGlow {
    0%, 100% {
        box-shadow: 0 0 0 rgba(233, 69, 96, 0);
    }
    50% {
        box-shadow: 0 0 18px rgba(233, 69, 96, 0.55);
    }
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 40px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out backwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent);
    box-shadow: 0 20px 60px rgba(233, 69, 96, 0.2);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-bottom: 25px;
    transition: all 0.4s ease;
}

.card:hover .card-icon {
    transform: rotate(10deg) scale(1.1);
}

.card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--accent-light);
}

.card p {
    color: var(--text-dim);
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-status {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(233, 69, 96, 0.2);
    color: var(--accent);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-status.available {
    background: rgba(152, 216, 200, 0.2);
    color: #98d8c8;
}

.card-status.coming-soon {
    background: rgba(255, 160, 122, 0.2);
    color: #ffa07a;
}

/* PDF tile */
.pdf-card {
    grid-row: span 1;
}

.pdf-list {
    list-style: none;
    margin: 10px 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow: auto;
}

.pdf-list a {
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
    display: block;
}

.pdf-list a:hover {
    color: var(--accent-light);
    border-color: var(--accent);
    background: rgba(233, 69, 96, 0.12);
}

/* Coming Soon Cards */
.card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.card.coming-soon:hover {
    transform: none;
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
}

.card.coming-soon::before {
    display: none;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 60px;
    animation: fadeIn 1s ease-out 0.8s backwards;
}

.footer p {
    color: var(--text-dim);
    font-size: 14px;
}

/* Welcome banner */
.welcome-banner {
    position: fixed;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    margin: 0;
    padding: 14px 18px;
    max-width: min(720px, calc(100% - 40px));
    background: rgba(233, 69, 96, 0.16);
    border: 1px solid rgba(233, 69, 96, 0.45);
    border-radius: 12px;
    color: var(--text);
    text-align: center;
    font-weight: 600;
    line-height: 1.5;
    z-index: 2105;
    backdrop-filter: blur(6px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}

.welcome-banner.hidden {
    display: none;
}

.hidden {
    display: none;
}

/* Kural banner */
.kural-banner {
    position: relative;
    padding: 26px 30px 22px;
    max-width: 980px;
    margin: 0 auto 40px auto;
    min-height: 140px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.kural-banner .kural-timer {
    display: none;
}

.kural-banner.kural-floating {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: min(980px, calc(100% - 80px));
    margin: 0;
    z-index: 1300;
    backdrop-filter: blur(10px);
}

.kural-label {
    position: absolute;
    top: 12px;
    left: 16px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-light);
    text-shadow: 0 0 10px rgba(255, 107, 157, 0.8), 0 0 18px rgba(233, 69, 96, 0.6);
}

.kural-bubbles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.kural-bubble {
    position: absolute;
    top: 10%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.12);
    opacity: 0.2;
    animation: bubbleFloat 10s ease-in-out infinite;
}

.kural-bubble:nth-child(1) { left: 6%; top: 18%; width: 18px; height: 18px; animation-duration: 9s; animation-delay: 0s; }
.kural-bubble:nth-child(2) { left: 14%; top: 55%; width: 28px; height: 28px; animation-duration: 15s; animation-delay: 1.5s; }
.kural-bubble:nth-child(3) { left: 22%; top: 30%; width: 14px; height: 14px; animation-duration: 10s; animation-delay: 2s; }
.kural-bubble:nth-child(4) { left: 32%; top: 65%; width: 24px; height: 24px; animation-duration: 13s; animation-delay: 0.8s; }
.kural-bubble:nth-child(5) { left: 42%; top: 24%; width: 16px; height: 16px; animation-duration: 11s; animation-delay: 2.8s; }
.kural-bubble:nth-child(6) { left: 52%; top: 48%; width: 30px; height: 30px; animation-duration: 17s; animation-delay: 0.4s; }
.kural-bubble:nth-child(7) { left: 60%; top: 20%; width: 20px; height: 20px; animation-duration: 12s; animation-delay: 3.2s; }
.kural-bubble:nth-child(8) { left: 68%; top: 60%; width: 12px; height: 12px; animation-duration: 8s; animation-delay: 1.1s; }
.kural-bubble:nth-child(9) { left: 76%; top: 32%; width: 26px; height: 26px; animation-duration: 16s; animation-delay: 2.4s; }
.kural-bubble:nth-child(10) { left: 84%; top: 52%; width: 18px; height: 18px; animation-duration: 10.5s; animation-delay: 0.9s; }
.kural-bubble:nth-child(11) { left: 90%; top: 26%; width: 22px; height: 22px; animation-duration: 14s; animation-delay: 3.6s; }
.kural-bubble:nth-child(12) { left: 94%; top: 70%; width: 14px; height: 14px; animation-duration: 9.5s; animation-delay: 1.8s; }

.kural-label,
.kural-next,
.kural-content,
.kural-loading {
    position: relative;
    z-index: 2;
}

@keyframes bubbleFloat {
    0%, 100% { transform: translate(0, 0) scale(0.95); opacity: 0.2; }
    35% { transform: translate(10px, -8px) scale(1.05); opacity: 0.3; }
    70% { transform: translate(-6px, 10px) scale(1); opacity: 0.25; }
}

@media (prefers-reduced-motion: reduce) {
    .kural-bubble {
        animation: none;
        opacity: 0.35;
        bottom: 10%;
    }
}

.kural-next {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: linear-gradient(135deg, rgba(233, 69, 96, 0.7), rgba(255, 107, 157, 0.7));
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(233, 69, 96, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: kuralArrowFloat 2.4s ease-in-out infinite;
}

.kural-next-icon {
    font-size: 18px;
    display: inline-block;
    transform: translateX(1px);
}

.kural-next:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 22px rgba(233, 69, 96, 0.5);
}

.kural-next:active {
    transform: translateY(0) scale(0.98);
}

.kural-next.kural-rotate .kural-next-icon {
    animation: kuralSpin 0.6s ease;
}

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

@keyframes kuralSpin {
    0% { transform: translateX(1px) rotate(0deg); }
    100% { transform: translateX(1px) rotate(360deg); }
}

.kural-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.kural-number {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.kural-tamil {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
}

.kural-tamil span {
    display: block;
}

.kural-transliteration {
    font-size: 14px;
    color: var(--text-dim);
}

.kural-english {
    font-size: 14px;
    color: var(--text);
}

.kural-loading {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-dim);
    opacity: 0;
    min-height: 18px;
    transition: opacity 0.2s ease;
}

.kural-loading.visible {
    opacity: 1;
    animation: kuralShimmer 1.4s ease-in-out infinite;
}

@keyframes kuralShimmer {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.9; }
}

@media (max-width: 768px) {
    .kural-banner {
        padding: 22px 20px 18px;
        min-height: 150px;
    }

    .kural-banner.kural-floating {
        width: calc(100% - 30px);
        top: 84px;
    }

    .kural-tamil {
        font-size: 18px;
    }
}

/* Search panel */
.search-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin: 0 auto 50px auto;
    max-width: 900px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.search-panel h2 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-light);
    margin-bottom: 16px;
}

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

.search-form input {
    flex: 1;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.search-form button {
    background: var(--accent);
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.search-status {
    margin-top: 10px;
    color: var(--text-dim);
    font-size: 13px;
}

.search-results {
    list-style: none;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-results li {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 12px;
    border-radius: 10px;
}

.search-results li.active {
    background: rgba(233, 69, 96, 0.18);
    border-color: rgba(233, 69, 96, 0.5);
}

.search-results a {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 4px;
}

.search-results p {
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.5;
}

/* Intro modal */
.intro-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    backdrop-filter: blur(4px);
}

.intro-modal.hidden {
    display: none;
}

.intro-dialog {
    position: relative;
    width: min(560px, 92vw);
    background: #121224;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 30px 28px 26px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
}

.intro-dialog h2 {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    margin-bottom: 10px;
}

.intro-dialog p {
    color: var(--text-dim);
    margin-bottom: 14px;
}

.intro-list {
    list-style: none; /* remove default bullets */
    padding: 0;
    margin: 0 0 20px 0;

    display: flex;
    flex-direction: column;
    gap: 12px;

    color: var(--text);
}

.intro-item {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 10px 12px;
    border-radius: 10px;

    transition: background 0.2s ease, transform 0.1s ease;
}

.intro-item:hover {
    background: rgba(0, 0, 0, 0.05); /* subtle hover */
    transform: translateX(4px); /* slight movement */
}

.intro-item:first-child {
    font-weight: 600;
    background: rgba(79, 70, 229, 0.08);
}

.icon {
    width: 20px;
    height: 20px;
    color: #4f46e5; /* or use var(--primary) */
    flex-shrink: 0;
}

.intro-actions {
    display: flex;
    justify-content: flex-end;
}

.intro-actions button {
    background: var(--accent);
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.intro-actions button:hover {
    background: var(--accent-light);
}

.intro-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.intro-close:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* Visit modal */
.visit-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.visit-modal.hidden {
    display: none;
}

.visit-dialog {
    width: min(420px, 92vw);
    background: #121224;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 48px 28px 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
}

.visit-dialog h2 {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    margin-bottom: 10px;
}

.visit-dialog p {
    color: var(--text-dim);
    margin-bottom: 16px;
}

.visit-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.visit-form input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.visit-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.2);
}

.visit-error {
    color: #ff8aa0;
    font-size: 12px;
    min-height: 16px;
}

.visit-form button {
    background: var(--accent);
    border: none;
    color: white;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.visit-form button:hover {
    background: var(--accent-light);
}

.visit-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.visit-tab {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
}

.visit-tab.active {
    background: var(--accent);
    border-color: var(--accent);
}

.visit-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 70, 90, 0.18);
    border: 1px solid rgba(255, 70, 90, 0.6);
    color: #ffd7dd;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    box-shadow: 0 0 16px rgba(255, 70, 90, 0.35);
    animation: closePulse 1.8s ease-in-out infinite;
}

.visit-close:hover {
    background: rgba(255, 70, 90, 0.35);
    box-shadow: 0 0 22px rgba(255, 70, 90, 0.55);
}

.visit-close:active {
    transform: scale(0.96);
}

@keyframes closePulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 12px rgba(255, 70, 90, 0.25); }
    50% { transform: scale(1.06); box-shadow: 0 0 22px rgba(255, 70, 90, 0.55); }
}

.welcome-banner.warning {
    background: rgba(16, 10, 18, 0.92);
    border-color: rgba(255, 70, 90, 0.65);
    color: #ffd7dd;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.welcome-banner.notice-pop {
    animation: bannerSpotlight 6.2s ease-in-out;
    transform-origin: center top;
    --banner-center-shift: calc(50vh - 180px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

@keyframes bannerSpotlight {
    0% { transform: translateX(-50%) translateY(var(--banner-center-shift)) scale(1.25); opacity: 0; }
    8% { transform: translateX(-50%) translateY(var(--banner-center-shift)) scale(1.25); opacity: 1; }
    18% { opacity: 0.6; }
    28% { opacity: 1; }
    38% { opacity: 0.6; }
    48% { opacity: 1; }
    58% { opacity: 0.6; }
    68% { opacity: 1; }
    80% { transform: translateX(-50%) translateY(var(--banner-center-shift)) scale(1.2); opacity: 1; }
    100% { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
}

/* Chat widget (index) */
.chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: min(80vw, 900px);
    height: 80vh;
    min-height: 320px;
    background: #121224;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    min-width: 280px;
    min-height: 320px;
}

.chat-header {
    padding: 10px 12px;
    background: rgba(233, 69, 96, 0.2);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.chat-min-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.chat-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 10px;
}

.chat-tab {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    padding: 6px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
}

.chat-tab.active {
    background: var(--accent);
    border-color: var(--accent);
}

.chat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    margin-left: 6px;
}

.chat-body {
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
    flex: 1;
}

.chat-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 8px;
    border-radius: 8px;
    align-self: flex-start;
    max-width: 85%;
}

.chat-item-own {
    align-self: flex-end;
    background: rgba(233, 69, 96, 0.18);
    border-color: rgba(233, 69, 96, 0.45);
    text-align: left;
}

.chat-meta {
    color: var(--text-dim);
    font-size: 11px;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.chat-time {
    color: var(--text-dim);
    font-size: 11px;
}

.chat-seen {
    margin-top: 4px;
    font-size: 10px;
    color: var(--text-dim);
}

.chat-day {
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    margin: 6px 0;
}

.chat-form {
    display: flex;
    gap: 6px;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-tools {
    display: flex;
    justify-content: flex-end;
    padding: 6px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-tool-btn,
.chat-delete-btn,
.chat-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.chat-tool-btn:hover,
.chat-delete-btn:hover,
.chat-copy-btn:hover {
    background: rgba(233, 69, 96, 0.18);
    border-color: rgba(233, 69, 96, 0.45);
}

.chat-tool-btn svg,
.chat-delete-btn svg,
.chat-copy-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.chat-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 6px;
}

.chat-minimized {
    display: none;
}

.chat-bubble {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border: none;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(233, 69, 96, 0.35);
    cursor: pointer;
    z-index: 2001;
    transition: left 1.2s ease, top 1.2s ease;
}

.chat-resizer {
    position: absolute;
    left: 6px;
    top: 6px;
    width: 16px;
    height: 16px;
    border-left: 2px solid rgba(255, 255, 255, 0.35);
    border-top: 2px solid rgba(255, 255, 255, 0.35);
    cursor: nwse-resize;
}

.chat-bounce {
    animation: chatBounce 0.6s ease;
}

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

.chat-form textarea {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text);
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 12px;
    resize: vertical;
    min-height: 34px;
    max-height: 140px;
    font-family: inherit;
    line-height: 1.4;
    overflow-y: hidden;
}

.chat-form button {
    background: var(--accent);
    border: none;
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
}

.chat-message {
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.chat-table th,
.chat-table td {
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 4px 6px;
    text-align: left;
    vertical-align: top;
}

.chat-table th {
    background: rgba(233, 69, 96, 0.18);
    color: var(--text);
    font-weight: 600;
}

.chat-table-row-hidden {
    display: none;
}

.chat-message.clamp {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--chat-line-clamp, 5);
    overflow: hidden;
}

.chat-toggle-btn {
    background: transparent;
    border: none;
    color: var(--accent-light);
    font-size: 11px;
    cursor: pointer;
    padding: 2px 4px;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 48px;
    }

    .header p {
        font-size: 16px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        padding: 30px;
    }
}

/* Decorative background elements */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(233, 69, 96, 0.1) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse 8s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    bottom: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(135, 206, 235, 0.05) 0%, transparent 70%);
    pointer-events: none;
    animation: pulse 10s ease-in-out infinite reverse;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}
