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

:root {
    --mako-green: #00ff9d;
    --mako-green-dark: #00cc7a;
    --materia-blue: #00a2ff;
    --meteor-red: #ff3333;
    --bg-dark: #0a0a12;
    --bg-purple: #1a1a2e;
    --text-glow: 0 0 10px var(--mako-green), 0 0 20px var(--mako-green);
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-purple) 50%, #0d0d1a 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scanline overlay */
#scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.1) 0px,
        rgba(0, 0, 0, 0.1) 1px,
        transparent 1px,
        transparent 3px
    );
    opacity: 0.3;
}

/* Header */
#header {
    padding: 1rem 2rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    position: relative;
    z-index: 10;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.materia-orb {
    width: 30px;
    height: 30px;
    background: radial-gradient(circle at 30% 30%, var(--mako-green), #006644);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--mako-green), 0 0 30px var(--mako-green);
    animation: pulse 2s ease-in-out infinite;
}

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

#header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 0.5em;
    color: #fff;
    text-shadow: var(--text-glow);
}

.discovery-count {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--mako-green);
    letter-spacing: 0.2em;
    padding: 0.5rem 1rem;
    border: 1px solid var(--mako-green);
    background: rgba(0, 255, 157, 0.1);
}

/* Main Container */
#main-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1rem;
    padding: 1rem 2rem;
    min-height: calc(100vh - 200px);
    position: relative;
}

@media (max-width: 900px) {
    #main-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
}

/* 3D Scene */
#scene-container {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: 2px solid var(--mako-green);
    border-radius: 8px;
    background: radial-gradient(ellipse at center, var(--bg-purple) 0%, var(--bg-dark) 100%);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2), inset 0 0 50px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

#scene-container canvas {
    display: block;
}

/* Creature Info Panel */
#creature-info {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(10, 10, 18, 0.95) 100%);
    border: 2px solid var(--mako-green);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.2);
    transition: all 0.3s ease;
}

#creature-info.hidden {
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--mako-green);
    padding-bottom: 0.5rem;
}

.info-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: var(--text-glow);
    letter-spacing: 0.1em;
}

#creature-level {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--materia-blue);
    background: rgba(0, 162, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
}

/* Stat Bars */
.stat-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    width: 30px;
    color: #aaa;
}

.stat-bar {
    flex: 1;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.stat-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.hp-bar .stat-fill {
    background: linear-gradient(90deg, #ff3333, #ff6666);
    box-shadow: 0 0 10px #ff3333;
}

.mp-bar .stat-fill {
    background: linear-gradient(90deg, var(--materia-blue), #66ccff);
    box-shadow: 0 0 10px var(--materia-blue);
}

.stat-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

/* Weaknesses */
.weaknesses {
    font-size: 1.1rem;
    padding: 0.5rem;
    background: rgba(255, 51, 51, 0.1);
    border-radius: 4px;
    border-left: 3px solid var(--meteor-red);
}

.weakness-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.8rem;
    color: var(--meteor-red);
    margin-right: 0.5rem;
}

/* Location */
.location {
    font-size: 0.9rem;
    color: #aaa;
    font-style: italic;
}

/* Flavor Text */
.flavor-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #ccc;
    padding: 0.75rem;
    background: rgba(0, 255, 157, 0.05);
    border-radius: 4px;
    border-left: 3px solid var(--mako-green);
}

/* Items */
.items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #333;
}

.item-row {
    font-size: 0.85rem;
}

.item-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    color: var(--mako-green);
    margin-right: 0.5rem;
}

/* Creature Placeholder */
.creature-placeholder {
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(10, 10, 18, 0.95) 100%);
    border: 2px solid #333;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem;
}

.creature-placeholder.hidden {
    display: none;
}

.unknown-icon {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    color: #333;
    text-shadow: 0 0 10px #222;
}

.creature-placeholder p {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: #555;
    letter-spacing: 0.1em;
}

/* Easter Egg Message */
#easter-egg-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: var(--text-glow);
    background: rgba(0, 0, 0, 0.9);
    padding: 1rem 2rem;
    border: 2px solid var(--mako-green);
    border-radius: 8px;
    z-index: 100;
    transition: transform 0.3s ease;
    pointer-events: none;
}

#easter-egg-message.show {
    transform: translate(-50%, -50%) scale(1);
}

/* Navigation */
#creature-nav {
    padding: 1rem 2rem;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 1rem;
    padding: 0.75rem 1.5rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    color: #fff;
    background: linear-gradient(135deg, var(--meteor-red) 0%, #cc2222 100%);
    border: 2px solid #ff6666;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(255, 51, 51, 0.5);
}

.action-btn.spinning {
    animation: spin 0.3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-icon {
    font-size: 1.2rem;
}

/* Carousel */
#creature-carousel {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--mako-green) var(--bg-dark);
}

#creature-carousel::-webkit-scrollbar {
    height: 8px;
}

#creature-carousel::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 4px;
}

#creature-carousel::-webkit-scrollbar-thumb {
    background: var(--mako-green);
    border-radius: 4px;
}

.carousel-item {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(26, 26, 46, 0.8);
    border: 2px solid #333;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.carousel-item:hover {
    border-color: var(--mako-green);
    transform: translateY(-3px);
}

.carousel-item.selected {
    border-color: var(--mako-green);
    background: rgba(0, 255, 157, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
}

.creature-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.creature-label {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.6rem;
    color: #aaa;
    letter-spacing: 0.05em;
    text-align: center;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Footer */
footer {
    padding: 1rem 2rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid #222;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.buster-sword {
    font-size: 1.5rem;
    opacity: 0.5;
}

footer a {
    color: var(--mako-green);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff;
    text-shadow: var(--text-glow);
}

.disclaimer {
    font-size: 0.75rem;
    color: #555;
    font-style: italic;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    #header h1 {
        font-size: 1.5rem;
        letter-spacing: 0.2em;
    }
    
    .discovery-count {
        font-size: 0.7rem;
    }
    
    #main-container {
        min-height: auto;
    }
    
    #scene-container {
        min-height: 300px;
    }
    
    #creature-info {
        padding: 1rem;
    }
    
    .info-header h2 {
        font-size: 1.2rem;
    }
    
    .carousel-item {
        min-width: 70px;
        padding: 0.5rem;
    }
    
    .creature-icon {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}