:root {
    --bg-color: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --accent: #8b5cf6;
    --success: #10b981;
}

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

body {
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background Blobs for Glassmorphism effect */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.5;
    border-radius: 50%;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(59,130,246,0.6) 0%, rgba(30,41,59,0) 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(139,92,246,0.5) 0%, rgba(30,41,59,0) 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(10%, 10%) scale(1.1); }
}

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

/* Glass Panel Utility */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Header */
.site-header {
    padding: 40px 0;
    text-align: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.tagline {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Controls */
.controls {
    padding: 24px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-group h2 {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.level-selector, .genre-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.level-btn, .genre-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.level-btn:hover, .genre-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.level-btn.active, .genre-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.level-guide {
    margin-top: 10px;
    border-top: 1px dashed var(--glass-border);
    padding-top: 20px;
}

.guide-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.guide-content strong {
    color: var(--text-main);
}

/* Articles Container */
.articles-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 60px;
}

.loading, .no-articles {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-size: 1.2rem;
}

/* Article Card */
.article-card {
    padding: 30px;
    transition: transform 0.3s ease;
}

.article-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 16px;
}

.article-level-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.local-level-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.local-level-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.local-level-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.level-badge { background: rgba(59, 130, 246, 0.2); color: #93c5fd; }
.genre-badge { background: rgba(139, 92, 246, 0.2); color: #c4b5fd; }
.date-badge { background: rgba(255, 255, 255, 0.1); color: var(--text-muted); }
.time-badge { background: rgba(16, 185, 129, 0.2); color: #6ee7b7; }

.article-title {
    font-size: 1.8rem;
    line-height: 1.3;
    color: #fff;
}

/* Article Content - Sentences */
.sentence-block {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.sentence-block:hover {
    background: rgba(255, 255, 255, 0.03);
}

.sentence-en {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #fff;
    cursor: pointer;
    position: relative;
}

.sentence-en::after {
    content: '▼';
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    vertical-align: middle;
}

.sentence-en:hover::after {
    opacity: 1;
}

.sentence-ja {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 8px;
    padding-left: 16px;
    border-left: 2px solid var(--accent);
    display: none;
    animation: slideDown 0.3s ease forwards;
}

.sentence-ja.show {
    display: block;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toggle-all-btn {
    width: 100%;
    margin-top: 20px;
}

.site-footer {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
}

/* Responsive */
@media (max-width: 600px) {
    .article-card { padding: 20px; }
    .article-title { font-size: 1.5rem; }
    .sentence-en { font-size: 1.05rem; }
    .controls { padding: 16px; }
}
