body {
    background-color: #1a1a1a;
    background-image: 
        linear-gradient(#131313 1px, transparent 1px),
        linear-gradient(90deg, #131313 1px, transparent 1px);
    background-size: 100px 100px;
    margin: 0;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    position: relative;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background-color: #000000;
    color: #00FF00;
    height: 44px;
    font-size: 12px;
    margin-bottom: 100px;
}

.nav a {
    color: #00FF00;
    text-decoration: none;
}

.nav a:hover {
    text-decoration: underline;
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-divider {
    color: #666666;
}

.nav a.active {
    color: #00FF00;
    pointer-events: none;
}

.nav-center a {
    color: #00FF00;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-center a:hover {
    text-decoration: underline;
}

.nav-center a.active {
    color: #FFFFFF;
    background-color: #0066FF;
    padding: 2px 6px;
    text-decoration: none;
}

.description {
    color: #00FF00;
    text-align: justify;
    font-size: 12px;
    line-height: 1.6;
    padding: 0 20px;
    margin-bottom: 0;
    padding-bottom: 100px;
    max-width: 385px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(to bottom, #00FF00, #ff3333, #3333ff, #ffff33, #00FF00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
}

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

@media (max-width: 768px) {
    .description {
        padding-bottom: 50px;
    }
    
    /* Add consistent horizontal padding for mobile */
    body {
        padding: 0 20px;
    }
    
    /* Adjust nav padding for mobile */
    .nav {
        margin-left: -20px;
        margin-right: -20px;
        width: calc(100% + 40px);
    }
    
    /* Adjust vertical line position for mobile */
    .vertical-line {
        left: 20px;
    }
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 100px 20px;
}

.artwork {
    aspect-ratio: 1;
    position: relative;
    transition: transform 0.5s ease;
    transform-style: preserve-3d;
    cursor: pointer;
}

.artwork.isometric {
    transform: perspective(1000px) rotateX(40deg) rotateY(-30deg) rotateZ(-10deg) translateZ(50px);
}

.artwork iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    backface-visibility: hidden;
}

.artwork-link {
    display: block;
    font-size: 12px;
    text-decoration: none;
    margin-top: 5px;
    cursor: pointer;
}

.artwork-link .title {
    color: #00FF00;
}

.artwork-link .filename {
    color: #666666;
}

.artwork-link:hover {
    text-decoration: underline;
}

.artwork-container {
    margin-bottom: 10px;
}

/* Remove underline from artwork links */
.artwork-link {
    text-decoration: none;
}

/* Target all links in the preview */
a {
    text-decoration: none;
}

/* ASCII art styling */
.ascii-art {
    font-family: monospace;
    white-space: pre;
    line-height: 1;
    margin-bottom: 30px;
    color: #00FF00;
    /* Override description gradient */
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    -webkit-text-fill-color: #00FF00;
}

/* Override gradient effect for active links in description */
.description a.active {
    background: #0066FF;
    -webkit-text-fill-color: #FFFFFF;
    -webkit-background-clip: initial;
    background-clip: initial;
    padding: 2px 6px;
    text-decoration: none;
    display: inline-block;
}

.ai-brain-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
}

/* Adjust ai-brain for standalone use */
.ai-brain-container .ai-brain {
    position: static;
    transform: none;
    display: flex;
    gap: 5px;
}

.ai-brain-node {
    width: 10px;
    height: 10px;
    border: none;
    animation: colorPulse 2s infinite;
}

@keyframes colorPulse {
    0%, 100% { background-color: #1a1a1a; }
    50% { background-color: #333333; }
}

.footer {
    text-align: center;
    font-size: 12px;
    color: #444444;
    padding-bottom: 100px;
}

.footer a {
    color: #FFFFFF;
    background-color: #0066FF;
    padding: 2px 6px;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Add vertical gradient line */
.vertical-line {
    position: fixed;
    left: 0;
    top: 0;
    width: 18px;
    height: 100vh;
    background: linear-gradient(to bottom, #00FF00, #ff3333, #3333ff, #ffff33, #00FF00);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    z-index: 0;
}

.nav-left {
    padding-left: 18px;
}

/* Toast notification */
.ai-toast {
    position: fixed;
    top: 75px;
    right: 40px;
    width: 250px;
    height: 80px;
    border-radius: 8px;
    background: linear-gradient(to bottom, #00FF00, #ff3333, #3333ff, #ffff33, #00FF00);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite, fadeInOut 8s forwards;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #000000;
    text-align: center;
    padding: 20px;
    z-index: 100;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-20px); }
    10% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(20px); }
}

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