:root {
    --bg-dark: #0a0a0e;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-1: #6366f1; /* Indigo */
    --accent-2: #ec4899; /* Pink */
    --accent-3: #06b6d4; /* Cyan */
    --font-en: 'Inter', sans-serif;
    --font-jp: 'Noto Sans JP', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-jp);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background animated blobs */
.background-elements {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    width: 40px; height: 600px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    top: -10%; left: -10%;
}

.blob-2 {
    width: 500px; height: 500px;
    background: linear-gradient(135deg, var(--accent-3), var(--accent-1));
    bottom: -10%; right: -10%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

/* Layout */


header {
    text-align: center;
    margin-bottom: 4rem;
}

.header-image {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--card-border);
}

h1 {
    font-family: var(--font-en);
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    background: linear-gradient(to right, #fff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 2.5rem;
}

.header-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
}

#search-input {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 99px;
    padding: 0.8rem 1.5rem;
    color: var(--text-main);
    font-family: var(--font-jp);
    font-size: 1rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: var(--accent-1);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

#filter-btn {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50%;
    width: 48px; height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#filter-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--text-muted);
}

/* Navigation */








/* Grid Layout */
#content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

/* Glassmorphism Card */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255,255,255,0.2);
}

/* Card Header */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.badge-do {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    font-family: var(--font-en);
    letter-spacing: 0.05em;
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    font-family: var(--font-en);
    letter-spacing: 0.05em;
}

.importance {
    font-size: 1rem;
}
.imp-high { color: #f87171; }
.imp-medium { color: #fbbf24; }
.imp-low { color: #9ca3af; }

/* Card Content */
.card-topic {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.card-desc {
    font-size: 0.95rem;
    color: #d1d5db;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card-reason {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.2);
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent-1);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    font-size: 0.75rem;
    color: var(--accent-3);
    background: rgba(6, 182, 212, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.loading {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-muted);
    padding: 4rem 0;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fadeIn 0.5s ease forwards;
}


/* Visual Elements Added via Request */
.parallax-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url('bg_texture.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -2;
    opacity: 0.3;
    pointer-events: none;
}

.divider-image {
    width: 100%;
    max-width: 500px;
    margin: 3rem auto;
    display: block;
    opacity: 0.8;
}

.eyecatch-container {
    grid-column: 1 / -1;
    text-align: center;
    margin: 1rem 0 3rem 0;
}

.eyecatch-image {
    width: 40%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    border: 1px solid var(--card-border);
}

/* Wiki Layout */
.wiki-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 2rem;
    height: calc(100vh - 4rem);
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1rem;
}

.sidebar-header h2 {
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-1);
    letter-spacing: 0.05em;
}

.sidebar-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Sidebar Nav */
#sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    background: transparent;
    border: none;
    text-align: left;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: var(--font-jp);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
    color: var(--text-main);
    border-left: 4px solid var(--accent-1);
}

/* Content Area */
.content-area {
    min-width: 0; /* Prevents grid blowout */
}

/* Responsive (Mobile) */
@media (max-width: 900px) {
    .wiki-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        height: auto;
        max-height: 300px;
        margin-bottom: 2rem;
    }
}

/* Wiki Layout */
.wiki-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 2rem;
    height: calc(100vh - 4rem);
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.sidebar-header {
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1rem;
}

.sidebar-header h2 {
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-1);
    letter-spacing: 0.05em;
}

.sidebar-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Sidebar Nav */
#sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    background: transparent;
    border: none;
    text-align: left;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-family: var(--font-jp);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-main);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.2));
    color: var(--text-main);
    border-left: 4px solid var(--accent-1);
}

/* Content Area */
.content-area {
    min-width: 0; /* Prevents grid blowout */
}

/* Responsive (Mobile) */
@media (max-width: 900px) {
    .wiki-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: relative;
        top: 0;
        height: auto;
        max-height: 300px;
        margin-bottom: 2rem;
    }
}
