:root {
    --bg-color: #05050f;
    --card-bg: rgba(15, 15, 30, 0.6);
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0b0;
    --accent-cyan: #00f3ff;
    --accent-yellow: #fce100;
    --accent-blue: #0044ff;
    --accent-red: #ff4433;
    --neon-cyan-glow: 0 0 10px rgba(0, 243, 255, 0.5), 0 0 20px rgba(0, 243, 255, 0.3);
    --neon-yellow-glow: 0 0 10px rgba(252, 225, 0, 0.5), 0 0 20px rgba(252, 225, 0, 0.3);
    --neon-red-glow: 0 0 10px rgba(255, 68, 51, 0.5), 0 0 20px rgba(255, 68, 51, 0.3);
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Pretendard', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    background-image: 
        linear-gradient(rgba(5, 5, 15, 0.9), rgba(5, 5, 15, 0.9)),
        url('data:image/svg+xml;utf8,<svg width="40" height="40" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h40v40H0z" fill="none"/><path d="M0 39h40" stroke="rgba(0, 243, 255, 0.05)" stroke-width="1"/><path d="M39 0v40" stroke="rgba(0, 243, 255, 0.05)" stroke-width="1"/></svg>');
}

a {
    text-decoration: none;
    color: var(--accent-cyan);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-yellow);
    text-shadow: var(--neon-yellow-glow);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Loading Screen */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-content {
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-top: 3px solid var(--accent-cyan);
    border-right: 3px solid var(--accent-yellow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-family: var(--font-heading);
    color: var(--accent-cyan);
    letter-spacing: 4px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; text-shadow: none; }
    50% { opacity: 1; text-shadow: var(--neon-cyan-glow); }
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
    z-index: 1000;
    padding: 20px 50px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2px;
}

.logo span {
    color: var(--accent-cyan);
    text-shadow: var(--neon-cyan-glow);
}

nav a {
    font-family: var(--font-heading);
    margin-left: 30px;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Floating Creator Button */
.creator-btn-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
}

.creator-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(15, 15, 30, 0.8);
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
    backdrop-filter: blur(5px);
    box-shadow: var(--neon-red-glow);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.creator-btn:hover {
    transform: scale(1.1);
    background: var(--accent-red);
    color: #000;
    box-shadow: 0 0 20px var(--accent-red);
}

.creator-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.tooltip {
    position: absolute;
    left: 80px;
    background: rgba(255, 68, 51, 0.1);
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    font-family: var(--font-body);
}

.creator-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Typography & Layout */
.section {
    padding: 100px 0;
    min-height: 100vh;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
    letter-spacing: 3px;
}

.section-title span {
    color: var(--accent-yellow);
    text-shadow: var(--neon-yellow-glow);
}

.subsection-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--accent-cyan);
    margin: 40px 0 20px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
    padding-bottom: 10px;
}

.text-center { text-align: center; }
.mb-4 { margin-bottom: 20px; }
.mt-2 { margin-top: 10px; }
.mt-4 { margin-top: 20px; }
.mt-6 { margin-top: 40px; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at right center, rgba(0, 243, 255, 0.1) 0%, transparent 50%);
    z-index: -1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.hero-text {
    flex: 1;
}

.subtitle {
    font-family: var(--font-heading);
    color: var(--accent-yellow);
    letter-spacing: 5px;
    text-transform: uppercase;
    font-size: 1rem;
    margin-bottom: 10px;
}

.glitch {
    font-family: var(--font-heading);
    font-size: 6rem;
    font-weight: 900;
    margin-bottom: 20px;
    position: relative;
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 500px;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.primary-btn {
    background: transparent;
    color: var(--accent-cyan);
    border: 1px solid var(--accent-cyan);
    box-shadow: var(--neon-cyan-glow);
}

.primary-btn:hover {
    background: var(--accent-cyan);
    color: #000;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.hero-image img {
    max-width: 80%;
    border-radius: 20px;
    box-shadow: var(--neon-cyan-glow);
    animation: float 6s ease-in-out infinite;
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

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

/* Cards & Elements */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 30px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.glass-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.neon-border {
    position: relative;
}

.neon-border::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.text-cyan { color: var(--accent-cyan); }
.text-yellow { color: var(--accent-yellow); }

/* Factions */
.faction-card {
    background: rgba(20, 20, 35, 0.8);
    border-radius: 8px;
    padding: 25px;
    border-top: 3px solid #fff;
    transition: all 0.3s ease;
}

.faction-card:hover { transform: scale(1.02); }

.faction-card.aegis { border-top-color: var(--accent-cyan); box-shadow: 0 -5px 15px rgba(0,243,255,0.1); }
.faction-card.libra { border-top-color: var(--accent-yellow); box-shadow: 0 -5px 15px rgba(252,225,0,0.1); }
.faction-card.eclipse { border-top-color: #ff0055; box-shadow: 0 -5px 15px rgba(255,0,85,0.1); }

.faction-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-style: italic;
}

.faction-card ul li, .card ul li {
    margin-bottom: 8px;
    list-style-type: none;
    position: relative;
    padding-left: 15px;
}

.faction-card ul li::before, .card ul li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-cyan);
    font-family: var(--font-heading);
}

.scrap-card {
    border: 1px dashed rgba(255, 0, 85, 0.5);
    background: rgba(255, 0, 85, 0.05);
}

.scrap-card h3 { color: #ff0055; }

/* Character Section */
.char-layout {
    display: flex;
    gap: 40px;
}

.char-visuals {
    flex: 1;
    min-width: 300px;
}

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

.img-toggle-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 15, 30, 0.7);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    z-index: 10;
}

.img-toggle-btn:hover {
    background: var(--accent-cyan);
    color: #000;
    transform: rotate(180deg);
}

.main-char-img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(0, 243, 255, 0.3);
    box-shadow: var(--neon-cyan-glow);
    display: block;
    transition: opacity 0.3s ease;
}

.char-stats {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--font-heading);
}
.stat-row:last-child { border-bottom: none; }

.char-details {
    flex: 2;
}

.char-details h3 {
    color: var(--accent-cyan);
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.detail-card p, .mini-card p {
    margin-bottom: 12px;
    line-height: 1.7;
}

.detail-card p:last-child, .mini-card p:last-child {
    margin-bottom: 0;
}

.voice-line {
    border-left: 3px solid var(--accent-yellow);
    padding: 15px;
    background: rgba(252, 225, 0, 0.05);
    margin-top: 20px;
    font-style: italic;
    color: #fff;
}

.ability-showcase {
    display: flex;
    gap: 20px;
    align-items: center;
}

.ability-img {
    width: 150px;
    border-radius: 8px;
    border: 1px solid var(--accent-yellow);
}

.warning-text {
    margin-top: 10px;
    color: #ffaa00;
    font-size: 0.9rem;
    padding: 10px;
    background: rgba(255, 170, 0, 0.1);
    border-radius: 4px;
}

/* Outfits Gallery */
.outfits-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 20px;
    border-bottom: 1px solid rgba(0, 243, 255, 0.3);
    padding-bottom: 10px;
}

.album-tabs {
    display: flex;
    gap: 10px;
}

.tab-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--font-heading);
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.tab-btn.active {
    background: rgba(0, 243, 255, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.example-label {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-family: var(--font-heading);
}
.outfit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.outfit-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.outfit-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-cyan);
}

.outfit-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    object-position: top;
}

.outfit-info {
    padding: 15px;
}

.outfit-info h5 {
    color: var(--accent-cyan);
    margin-bottom: 5px;
}

.outfit-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* System Section */
.system-card {
    position: relative;
    overflow: hidden;
}

.system-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.system-header .icon {
    font-size: 2.5rem;
}

.system-header h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.fat-system .system-header h3 { color: #ffaa00; }
.interest-system .system-header h3 { color: #ff0055; }

.system-list li { margin-bottom: 10px; }

.system-examples {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.system-examples p {
    margin-bottom: 12px;
}

.system-examples p:last-child {
    margin-bottom: 0;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    margin-right: 10px;
}

.badge.plus { background: rgba(0, 243, 255, 0.2); color: var(--accent-cyan); border: 1px solid var(--accent-cyan); }
.badge.minus { background: rgba(255, 0, 85, 0.2); color: #ff0055; border: 1px solid #ff0055; }

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.5);
    font-family: var(--font-heading);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .char-layout { flex-direction: column; }
    .grid-3 { grid-template-columns: 1fr; }
    .ability-showcase { flex-direction: column; }
    .ability-img { width: 100%; max-width: 300px; }
}

@media (max-width: 768px) {
    header { padding: 15px 20px; flex-direction: column; gap: 15px; }
    nav a { margin: 0 10px; font-size: 0.8rem; }
    .grid-2 { grid-template-columns: 1fr; }
    .hero-content { flex-direction: column; text-align: center; padding-top: 100px; }
    .hero-image { margin-top: 40px; justify-content: center; }
    .glitch { font-size: 4rem; }
    .creator-btn-container { bottom: 20px; left: 20px; }
    .creator-btn { width: 50px; height: 50px; }
    .tooltip { display: none; } /* Hide tooltip on mobile */
}

/* Modal (Lightbox) Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    padding-top: 50px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border: 2px solid var(--accent-cyan);
    box-shadow: var(--neon-cyan-glow);
    border-radius: 8px;
    animation: zoom 0.3s ease;
}

#modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: var(--accent-cyan);
    padding: 10px 0;
    height: 50px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    animation: zoom 0.3s ease;
}

@keyframes zoom {
    from {transform:scale(0.8); opacity:0;} 
    to {transform:scale(1); opacity:1;}
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--accent-yellow);
    text-decoration: none;
    text-shadow: var(--neon-yellow-glow);
}

.clickable-img {
    cursor: zoom-in;
    transition: 0.3s;
}

.clickable-img:hover {
    opacity: 0.8;
}
