/* 3D Homepage Templates - Developed by Muhammad Ali Mehdi */

html {
    margin: 0;
    padding: 0;
    height: auto;
}

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

:root {
    --primary: #00ff88;
    --secondary: #00d4ff;
    --accent: #bf00ff;
    --bg: #0a0a0f;
    --bg-secondary: #0d1117;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-secondary) 50%, var(--bg) 100%);
    min-height: 100vh;
    width: 100vw;
    overflow-x: hidden;
    overflow-y: auto;
    transition: all 0.5s ease;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 10px;
}

/* Background Effects */
.aurora {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 20%, color-mix(in srgb, var(--primary) 15%, transparent) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, color-mix(in srgb, var(--secondary) 10%, transparent) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 50%);
    animation: auroraMove 15s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes auroraMove {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(2%, 2%) rotate(5deg);
    }

    50% {
        transform: translate(-2%, 1%) rotate(-5deg);
    }

    75% {
        transform: translate(1%, -2%) rotate(3deg);
    }
}

.hex-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.12;
}

.cyber-line {
    position: fixed;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: lineScan 4s ease-in-out infinite;
    z-index: 3;
    pointer-events: none;
}

@keyframes lineScan {

    0%,
    100% {
        opacity: 0;
        transform: translateY(-100vh);
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(100vh);
    }
}

/* 3D Scene Container */
.scene-3d {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    perspective: 1500px;
    transform-style: preserve-3d;
    z-index: 2;
    pointer-events: none;
}

/* Code Cube */
.code-cube-container {
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 120px;
    transform-style: preserve-3d;
}

.code-cube {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: cubeRotate 12s linear infinite;
}

.cube-face {
    position: absolute;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fira Code', monospace;
    font-size: 2rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid color-mix(in srgb, var(--primary) 50%, transparent);
    color: var(--primary);
    text-shadow: 0 0 20px var(--primary);
    backface-visibility: visible;
}

.cube-face.front {
    transform: translateZ(60px);
}

.cube-face.back {
    transform: rotateY(180deg) translateZ(60px);
}

.cube-face.right {
    transform: rotateY(90deg) translateZ(60px);
}

.cube-face.left {
    transform: rotateY(-90deg) translateZ(60px);
}

.cube-face.top {
    transform: rotateX(90deg) translateZ(60px);
}

.cube-face.bottom {
    transform: rotateX(-90deg) translateZ(60px);
}

@keyframes cubeRotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* Secondary Cube */
.code-cube-container-2 {
    position: absolute;
    right: 5%;
    bottom: 20%;
    width: 80px;
    height: 80px;
    transform-style: preserve-3d;
}

.code-cube-2 {
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: cubeRotate 15s linear infinite reverse;
}

.cube-face-2 {
    position: absolute;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Fira Code', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid color-mix(in srgb, var(--secondary) 50%, transparent);
    color: var(--secondary);
    text-shadow: 0 0 15px var(--secondary);
}

.cube-face-2.front {
    transform: translateZ(40px);
}

.cube-face-2.back {
    transform: rotateY(180deg) translateZ(40px);
}

.cube-face-2.right {
    transform: rotateY(90deg) translateZ(40px);
}

.cube-face-2.left {
    transform: rotateY(-90deg) translateZ(40px);
}

.cube-face-2.top {
    transform: rotateX(90deg) translateZ(40px);
}

.cube-face-2.bottom {
    transform: rotateX(-90deg) translateZ(40px);
}

/* Torus Rings */
.torus-container {
    position: absolute;
    right: 8%;
    top: 20%;
    width: 150px;
    height: 150px;
    transform-style: preserve-3d;
    animation: torusRotate 20s linear infinite;
}

.torus-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
    transform-style: preserve-3d;
}

@keyframes torusRotate {
    0% {
        transform: rotateX(60deg) rotateY(0deg) rotateZ(0deg);
    }

    100% {
        transform: rotateX(60deg) rotateY(360deg) rotateZ(360deg);
    }
}

/* Floating Elements */
.floating-element {
    position: fixed;
    font-family: 'Fira Code', monospace;
    font-size: 4rem;
    font-weight: bold;
    color: color-mix(in srgb, var(--primary) 15%, transparent);
    text-shadow: 0 0 30px color-mix(in srgb, var(--primary) 30%, transparent);
    z-index: 1;
    pointer-events: none;
    animation: elementFloat 8s ease-in-out infinite;
}

@keyframes elementFloat {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Code Float */
.code-float {
    position: fixed;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
    border-radius: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: var(--primary);
    backdrop-filter: blur(10px);
    z-index: 2;
    pointer-events: none;
    animation: codeFloat 10s ease-in-out infinite;
}

@keyframes codeFloat {

    0%,
    100% {
        transform: translateY(0) rotate(-2deg);
    }

    50% {
        transform: translateY(-25px) rotate(2deg);
    }
}

/* Particles */
#particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    pointer-events: none;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    pointer-events: none;
}

.time-container,
.name-container,
.subtitle,
.search-container,
.links-section {
    pointer-events: auto;
}

/* Time Widget */
.time-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.time-widget {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(180deg, #ffffff 0%, var(--primary) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 15px color-mix(in srgb, var(--primary) 40%, transparent));
    letter-spacing: 4px;
}

.time-separator {
    width: 2px;
    height: 30px;
    background: linear-gradient(180deg, transparent, var(--primary), transparent);
}

.date-widget {
    font-family: 'Fira Code', monospace;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Name Title */
.name-container {
    position: relative;
    margin: 25px 0;
    transform-style: preserve-3d;
}

.name-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 25%, var(--accent) 50%, var(--secondary) 75%, var(--primary) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientFlow 5s ease infinite, float3D 6s ease-in-out infinite;
    position: relative;
}

.name-title::before,
.name-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.name-title::before {
    animation: glitch1 2s infinite linear alternate-reverse;
    clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.name-title::after {
    animation: glitch2 3s infinite linear alternate-reverse;
    clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float3D {

    0%,
    100% {
        transform: translateZ(0) rotateX(0deg);
    }

    50% {
        transform: translateZ(30px) rotateX(3deg);
    }
}

@keyframes glitch1 {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-3px);
    }

    40% {
        transform: translateX(3px);
    }

    60% {
        transform: translateX(-1px);
    }

    80% {
        transform: translateX(1px);
    }
}

@keyframes glitch2 {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(3px);
    }

    40% {
        transform: translateX(-3px);
    }

    60% {
        transform: translateX(1px);
    }

    80% {
        transform: translateX(-2px);
    }
}

.name-shadow {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 25px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 20%, transparent), transparent);
    filter: blur(15px);
    transform: scaleY(-1) translateY(15px);
}

/* Subtitle & Typing */
.subtitle {
    font-family: 'Fira Code', monospace;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    letter-spacing: 3px;
    margin-top: 10px;
}

.typing-text {
    color: var(--primary);
    text-shadow: 0 0 20px color-mix(in srgb, var(--primary) 50%, transparent);
}

.typing-text::after {
    content: '█';
    animation: blink 1s infinite;
    color: var(--primary);
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

/* Search Bar */
.search-container {
    width: 100%;
    max-width: 650px;
    margin: 35px 0;
}

.search-bar {
    width: 100%;
    padding: 20px 65px 20px 25px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid color-mix(in srgb, var(--primary) 30%, transparent);
    border-radius: 20px;
    color: white;
    outline: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(20px);
}

.search-bar:focus {
    border-color: var(--primary);
    box-shadow:
        0 0 40px color-mix(in srgb, var(--primary) 30%, transparent),
        0 0 80px color-mix(in srgb, var(--primary) 10%, transparent);
    transform: scale(1.02);
}

.search-bar::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.1) rotate(90deg);
    box-shadow: 0 0 30px color-mix(in srgb, var(--primary) 50%, transparent);
}

.search-btn i {
    color: var(--bg);
    font-size: 1.1rem;
}

/* Links Section */
.links-section {
    width: 100%;
    max-width: 850px;
    margin-top: 30px;
}

.links-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 0 10px;
}

.links-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.manage-btn {
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
    color: var(--primary);
    padding: 10px 18px;
    border-radius: 12px;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manage-btn:hover {
    background: color-mix(in srgb, var(--primary) 20%, transparent);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px color-mix(in srgb, var(--primary) 20%, transparent);
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 20px;
}

.link-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    text-decoration: none;
    transform-style: preserve-3d;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--card-glow) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-card:hover::before {
    opacity: 0.1;
}

.link-card:hover {
    transform: translateY(-12px) rotateX(8deg) rotateY(-4deg) scale(1.05);
    border-color: var(--card-color, var(--primary));
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 35px var(--card-glow, color-mix(in srgb, var(--primary) 30%, transparent));
}

.link-icon-wrapper {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 18px;
    margin-bottom: 12px;
    transition: all 0.5s ease;
}

.link-card:hover .link-icon-wrapper {
    transform: translateZ(25px) rotateY(360deg);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 25px var(--card-glow, color-mix(in srgb, var(--primary) 30%, transparent));
}

.link-icon {
    font-size: 2rem;
    transition: all 0.3s ease;
}

.link-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.link-card .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 0, 0, 0.3);
    border-radius: 50%;
    color: #ff4444;
    font-size: 10px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-card:hover .remove-btn {
    opacity: 1;
}

.remove-btn:hover {
    background: rgba(255, 0, 0, 0.4);
    transform: scale(1.2);
}

/* Template Selector Button */
.template-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
    border-radius: 12px;
    color: var(--primary);
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
}

.template-btn:hover {
    background: color-mix(in srgb, var(--primary) 20%, transparent);
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 0 30px color-mix(in srgb, var(--primary) 30%, transparent);
}

/* Settings Button */
.settings-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.settings-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    transform: rotate(90deg);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}



.modal-overlay.active {
    display: flex;
}

/* Delete Mode Active */
.delete-mode-notice {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 50, 50, 0.8);
    backdrop-filter: blur(10px);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 10000;
    align-items: center;
    gap: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    box-shadow: 0 5px 20px rgba(255, 50, 50, 0.4);
    display: none;
}

.obj-delete-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #ff3333;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(255, 50, 50, 0.5);
}

.delete-mode-active .floating-element:hover .obj-delete-btn,
.delete-mode-active .code-float:hover .obj-delete-btn,
.delete-mode-active .orbit-container:hover .obj-delete-btn,
.delete-mode-active .interactive-shape:hover .obj-delete-btn {
    opacity: 1;
    transform: scale(1);
}

.obj-delete-btn:hover {
    background: #ff0000;
    transform: scale(1.2) !important;
}

/* Scrollbar for large chat histories */

.modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f0f23 100%);
    border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
    border-radius: 25px;
    padding: 35px;
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlide 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 60px color-mix(in srgb, var(--primary) 20%, transparent);
}

.modal.large {
    max-width: 900px;
}

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

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.modal-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    color: var(--primary);
    letter-spacing: 2px;
}

.modal-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff4444;
    color: #ff4444;
    transform: rotate(90deg);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-family: 'Fira Code', monospace;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 20px color-mix(in srgb, var(--primary) 20%, transparent);
}

.icon-picker {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    max-height: 140px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.icon-option {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.icon-option:hover,
.icon-option.selected {
    background: color-mix(in srgb, var(--primary) 20%, transparent);
    border-color: var(--primary);
    transform: scale(1.1);
}

/* AI Loading Overlay */
.ai-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.ai-loading-overlay.active {
    opacity: 1;
}

.ai-loading-content {
    text-align: center;
    animation: float3d 4s ease-in-out infinite alternate;
}

.ai-spinner {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.ai-spinner-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-radius: 50%;
}

.ai-spinner-ring:nth-child(1) {
    border-top-color: var(--primary);
    border-bottom-color: var(--primary);
    animation: spinRotate 2s linear infinite;
}

.ai-spinner-ring:nth-child(2) {
    border-left-color: var(--secondary);
    border-right-color: var(--secondary);
    animation: spinRotateReverse 3s linear infinite;
    transform: scale(0.85);
}

@keyframes spinRotate {
    0% {
        transform: rotate(0deg);
    }

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

@keyframes spinRotateReverse {
    0% {
        transform: scale(0.85) rotate(360deg);
    }

    100% {
        transform: scale(0.85) rotate(0deg);
    }
}

.color-picker-wrapper {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-option {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
}

.color-option:hover,
.color-option.selected {
    transform: scale(1.2);
    border-color: white;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 12px;
    color: var(--bg);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px color-mix(in srgb, var(--primary) 40%, transparent);
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.template-card {
    padding: 25px;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.template-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--template-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.template-card.active {
    border-color: var(--template-color);
    background: color-mix(in srgb, var(--template-color) 10%, transparent);
}

.template-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.template-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: white;
    margin-bottom: 5px;
}

.template-desc {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Shortcut Hint */
.shortcut-hint {
    position: fixed;
    bottom: 25px;
    right: 25px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.shortcut-hint kbd {
    background: color-mix(in srgb, var(--primary) 20%, transparent);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary);
    margin: 0 3px;
}

/* Developer Credit */
.developer-credit {
    position: fixed;
    bottom: 25px;
    left: 25px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.developer-credit a {
    color: var(--primary);
    text-decoration: none;
}

/* Special Template Effects */
.sakura-particle {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #ff6b9d;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    animation: sakuraFall 10s linear infinite;
    pointer-events: none;
}

@keyframes sakuraFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

.star-particle {
    position: fixed;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

.pixel-particle {
    position: fixed;
    width: 8px;
    height: 8px;
    background: currentColor;
    animation: pixelMove 5s linear infinite;
    pointer-events: none;
}

@keyframes pixelMove {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(10px, -10px);
    }

    50% {
        transform: translate(-10px, 10px);
    }

    75% {
        transform: translate(10px, 10px);
    }
}

/* Orbiting Element */
.orbit-container {
    position: fixed;
    width: 60px;
    height: 60px;
    animation: orbitMove 25s linear infinite;
}

.orbit-element {
    width: 100%;
    height: 100%;
    border: 2px dashed color-mix(in srgb, var(--primary) 20%, transparent);
    border-radius: 50%;
    position: relative;
    animation: orbitSpin 8s linear infinite;
}

.orbit-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 15px var(--primary);
}

@keyframes orbitSpin {
    0% {
        transform: rotate(0deg);
    }

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

@keyframes orbitMove {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(30px, 20px);
    }

    50% {
        transform: translate(-20px, 40px);
    }

    75% {
        transform: translate(40px, -20px);
    }
}

/* Pyramid */
.pyramid-container {
    position: fixed;
    transform-style: preserve-3d;
    animation: pyramidFloat 6s ease-in-out infinite;
}

.pyramid {
    width: 60px;
    height: 60px;
    transform-style: preserve-3d;
    animation: pyramidRotate 15s linear infinite;
}

.pyramid-face {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid color-mix(in srgb, var(--accent) 20%, transparent);
    transform-origin: bottom center;
}

.pyramid-face:nth-child(1) {
    transform: rotateY(0deg) translateZ(17px) rotateX(30deg);
}

.pyramid-face:nth-child(2) {
    transform: rotateY(90deg) translateZ(17px) rotateX(30deg);
}

.pyramid-face:nth-child(3) {
    transform: rotateY(180deg) translateZ(17px) rotateX(30deg);
}

.pyramid-face:nth-child(4) {
    transform: rotateY(270deg) translateZ(17px) rotateX(30deg);
}

@keyframes pyramidRotate {
    0% {
        transform: rotateY(0deg);
    }

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

@keyframes pyramidFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Binary Stream */
.binary-stream {
    position: fixed;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: color-mix(in srgb, var(--primary) 20%, transparent);
    writing-mode: vertical-rl;
    z-index: 1;
    pointer-events: none;
    animation: binaryScroll 20s linear infinite;
}

@keyframes binaryScroll {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100vh);
    }
}

/* Additional 3D Template Animations - Add to your styles.css */

/* Programmer Animations */
@keyframes codeFloat {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
        opacity: 0.15;
    }

    50% {
        transform: translateY(-30px) rotate(5deg);
        opacity: 0.25;
    }
}

/* Gamer Animations */
@keyframes controllerSpin {
    0% {
        transform: rotateY(0deg) rotateX(-20deg);
    }

    100% {
        transform: rotateY(360deg) rotateX(-20deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Anime Animations */
@keyframes energyPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 50px rgba(255, 107, 157, 0.5);
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 0 80px rgba(255, 107, 157, 0.8);
    }
}

/* Creator Animations */
@keyframes brushStroke {

    0%,
    100% {
        transform: rotate(-30deg) translateX(0);
    }

    50% {
        transform: rotate(-35deg) translateX(10px);
    }
}

/* AI Developer Animations */
@keyframes neuronPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.6;
    }

    50% {
        transform: scale(1.5);
        opacity: 1;
    }
}

/* Cyberpunk Animations */
@keyframes holoFloat {

    0%,
    100% {
        transform: translateY(0) rotateY(20deg);
    }

    50% {
        transform: translateY(-15px) rotateY(-10deg);
    }
}

/* Space Animations */
@keyframes planetSpin {
    0% {
        transform: rotate(0deg);
    }

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

@keyframes rocketFly {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-30px) rotate(-5deg);
    }

    50% {
        transform: translateY(-50px) rotate(5deg);
    }

    75% {
        transform: translateY(-30px) rotate(-5deg);
    }
}

@keyframes flame {

    0%,
    100% {
        transform: scaleY(1);
        opacity: 0.8;
    }

    50% {
        transform: scaleY(1.3);
        opacity: 1;
    }
}

/* Music Animations */
@keyframes vinylSpin {
    0% {
        transform: rotate(0deg);
    }

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

@keyframes equalizerBounce {

    0%,
    100% {
        transform: scaleY(0.5);
    }

    50% {
        transform: scaleY(1);
    }
}

/* Crypto Animations */
@keyframes coinFlip0 {

    0%,
    100% {
        transform: rotateY(0deg);
    }

    50% {
        transform: rotateY(180deg);
    }
}

@keyframes coinFlip1 {

    0%,
    100% {
        transform: rotateY(0deg);
    }

    50% {
        transform: rotateY(180deg);
    }
}

@keyframes coinFlip2 {

    0%,
    100% {
        transform: rotateY(0deg);
    }

    50% {
        transform: rotateY(180deg);
    }
}

/* Nature Animations */
@keyframes bambooSway {

    0%,
    100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(3deg);
    }
}

@keyframes lotusFloat {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

/* Synthwave Animations */
@keyframes gridScroll {
    0% {
        transform: rotateX(60deg) translateY(50%);
    }

    100% {
        transform: rotateX(60deg) translateY(0%);
    }
}

/* Sci-Fi Animations */
@keyframes holoRingRotate0 {
    0% {
        transform: rotateX(60deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(60deg) rotateY(360deg);
    }
}

@keyframes holoRingRotate1 {
    0% {
        transform: rotateX(30deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(30deg) rotateY(-360deg);
    }
}

@keyframes holoRingRotate2 {
    0% {
        transform: rotateX(75deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(75deg) rotateY(360deg);
    }
}

/* Minimal Animations */
@keyframes minimalFloat {

    0%,
    100% {
        transform: translateY(0);
        opacity: 0.3;
    }

    50% {
        transform: translateY(-20px);
        opacity: 0.5;
    }
}

/* General 3D Float */
@keyframes float3d {

    0%,
    100% {
        transform: translateY(0) rotateY(-20deg);
    }

    50% {
        transform: translateY(-20px) rotateY(20deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #dynamic-3d-objects>div {
        transform: scale(0.7) !important;
    }
}


.code-cube-container,
.code-cube-container-2,
.torus-container,
.pyramid-container {
    pointer-events: auto !important;
    z-index: 10 !important;
}

/* ===== AI Action Buttons ===== */
.search-action-btns {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.ai-action-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
    border-radius: 50px;
    color: var(--primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(14px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    letter-spacing: 0.5px;
}

.ai-action-btn i {
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.ai-action-btn:hover {
    background: color-mix(in srgb, var(--primary) 15%, rgba(0, 0, 0, 0.7));
    border-color: var(--primary);
    box-shadow: 0 0 20px color-mix(in srgb, var(--primary) 30%, transparent),
        0 4px 15px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px) scale(1.04);
    color: white;
}

.ai-action-btn:hover i {
    transform: rotate(15deg) scale(1.2);
}

.ai-action-btn.bg-gen-btn {
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    color: var(--accent);
}

.ai-action-btn.bg-gen-btn:hover {
    background: color-mix(in srgb, var(--accent) 15%, rgba(0, 0, 0, 0.7));
    border-color: var(--accent);
    box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 30%, transparent),
        0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ===== AI Chat Modal ===== */
.ai-chat-modal {
    max-width: 560px;
    width: 92vw;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent) !important;
    box-shadow: 0 0 60px color-mix(in srgb, var(--primary) 15%, transparent),
        0 30px 60px rgba(0, 0, 0, 0.5) !important;
}

/* Chat header */
.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    background: linear-gradient(135deg,
            color-mix(in srgb, var(--primary) 8%, rgba(0, 0, 0, 0.95)),
            color-mix(in srgb, var(--secondary) 5%, rgba(0, 0, 0, 0.95)));
    border-bottom: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
}

.ai-chat-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ai-chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #000;
    box-shadow: 0 0 20px color-mix(in srgb, var(--primary) 40%, transparent);
    flex-shrink: 0;
    animation: pulse 3s ease-in-out infinite;
}

.ai-chat-close {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    transition: all 0.2s ease;
}

.ai-chat-close:hover {
    background: rgba(255, 0, 0, 0.2) !important;
    border-color: rgba(255, 0, 0, 0.4) !important;
    color: #ff6b6b !important;
}

/* Messages area */
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 260px;
    max-height: 400px;
    background: rgba(0, 0, 0, 0.25);
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--primary) 40%, transparent) transparent;
}

.ai-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.ai-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.ai-chat-messages::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--primary) 50%, transparent);
    border-radius: 10px;
}

/* Message rows */
.ai-chat-msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: chatMsgIn 0.25s ease;
}

@keyframes chatMsgIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.ai-chat-msg.user {
    flex-direction: row-reverse;
}

/* Avatars */
.ai-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
    margin-top: 2px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #000;
    box-shadow: 0 0 12px color-mix(in srgb, var(--primary) 30%, transparent);
}

.ai-msg-avatar.user-avatar {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    box-shadow: 0 0 12px color-mix(in srgb, var(--secondary) 30%, transparent);
}

/* Bubbles */
.ai-chat-bubble {
    max-width: 78%;
    padding: 12px 16px;
    font-size: 0.88rem;
    line-height: 1.65;
    word-break: break-word;
    border-radius: 4px 18px 18px 18px;
    background: color-mix(in srgb, var(--primary) 8%, rgba(10, 10, 20, 0.85));
    border: 1px solid color-mix(in srgb, var(--primary) 22%, transparent);
    color: rgba(255, 255, 255, 0.93);
    backdrop-filter: blur(12px);
}

.ai-chat-bubble.user-bubble {
    border-radius: 18px 4px 18px 18px;
    background: color-mix(in srgb, var(--secondary) 14%, rgba(10, 10, 20, 0.85));
    border-color: color-mix(in srgb, var(--secondary) 30%, transparent);
    color: rgba(255, 255, 255, 0.93);
}

/* ===== Markdown Rendered Styles inside bubbles ===== */
.ai-chat-bubble .ai-p {
    margin: 0 0 8px 0;
}

.ai-chat-bubble .ai-p:last-child {
    margin-bottom: 0;
}

.ai-chat-bubble strong {
    color: var(--primary);
    font-weight: 700;
}

.ai-chat-bubble em {
    color: color-mix(in srgb, var(--secondary) 90%, white);
    font-style: italic;
}

.ai-chat-bubble .ai-h {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary);
    margin: 10px 0 6px;
    font-size: 0.9em;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ai-chat-bubble .ai-ul {
    list-style: none;
    margin: 6px 0;
    padding: 0;
}

.ai-chat-bubble .ai-li {
    padding: 3px 0 3px 16px;
    position: relative;
    color: rgba(255, 255, 255, 0.88);
}

.ai-chat-bubble .ai-li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-size: 0.8em;
    top: 5px;
}

.ai-chat-bubble .ai-oli::before {
    content: '›';
}

.ai-chat-bubble .ai-hr {
    border: none;
    border-top: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
    margin: 10px 0;
}

.ai-chat-bubble .ai-code-block {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 8px 0;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--secondary);
    line-height: 1.5;
}

.ai-chat-bubble .ai-inline-code {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
    border-radius: 4px;
    padding: 1px 6px;
    font-family: 'Fira Code', monospace;
    font-size: 0.82em;
    color: var(--primary);
}

/* ===== Composer (input bar) ===== */
.ai-chat-composer {
    display: flex;
    align-items: flex-end;
    gap: 0;
    padding: 14px 18px;
    background: linear-gradient(135deg,
            color-mix(in srgb, var(--primary) 5%, rgba(0, 0, 0, 0.9)),
            color-mix(in srgb, var(--secondary) 3%, rgba(0, 0, 0, 0.9)));
    border-top: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
}

.ai-chat-textarea {
    flex: 1;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
    border-right: none;
    border-radius: 16px 0 0 16px;
    color: rgba(255, 255, 255, 0.93);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    padding: 12px 18px;
    outline: none;
    resize: none;
    min-height: 46px;
    max-height: 120px;
    line-height: 1.5;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(12px);
}

.ai-chat-textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.ai-chat-textarea:focus {
    border-color: var(--primary);
    box-shadow: -4px 0 20px color-mix(in srgb, var(--primary) 15%, transparent);
}

.ai-send-btn {
    width: 46px;
    min-height: 46px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 0 16px 16px 0;
    color: #000;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.ai-send-btn:hover {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    box-shadow: 4px 0 20px color-mix(in srgb, var(--primary) 30%, transparent);
    transform: scale(1.05);
}

.ai-send-btn:active {
    transform: scale(0.97);
}

/* ===== Background Generator Modal ===== */
#bgGenModal .modal {
    max-width: 440px;
}

#bgGenSubmit i,
#bgGenRandom i {
    margin-right: 6px;
}

/* ===== AI Table Styles ===== */
.ai-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 10px 0;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent);
}

.ai-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
}

.ai-table .ai-th {
    background: color-mix(in srgb, var(--primary) 18%, rgba(0, 0, 0, 0.7));
    color: var(--primary);
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 9px 13px;
    text-align: left;
    border-bottom: 2px solid color-mix(in srgb, var(--primary) 40%, transparent);
    white-space: nowrap;
}

.ai-table .ai-td {
    padding: 8px 13px;
    color: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid color-mix(in srgb, var(--primary) 10%, rgba(255, 255, 255, 0.05));
    vertical-align: top;
    line-height: 1.5;
}

.ai-table tr:last-child .ai-td {
    border-bottom: none;
}

.ai-table tbody tr:nth-child(even) .ai-td {
    background: color-mix(in srgb, var(--primary) 4%, rgba(0, 0, 0, 0.2));
}

.ai-table tbody tr:hover .ai-td {
    background: color-mix(in srgb, var(--primary) 10%, rgba(0, 0, 0, 0.3));
    color: white;
    transition: background 0.15s ease;
}