:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #151b2e;
    --bg-card: rgba(30, 41, 66, 0.6);
    --bg-card-hover: rgba(40, 51, 76, 0.8);
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #ec4899;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(99, 102, 241, 0.2);
    --success: #10b981;
    --gold: #fbbf24;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f35 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 1rem;
    padding: .5rem;
    /* background: var(--bg-card); */
    border-radius: 16px;
    backdrop-filter: blur(10px);
    /* border: 1px solid var(--border-color); */
    box-shadow: var(--shadow-lg);
}

.title {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.title-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Controls */
.controls {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    align-items: center;
}

.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.5;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-label {
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.filter-select {
    padding: 0.875rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--accent-primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Stats */
.stats {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.progress-bar {
    width: 200px;
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.board-section {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.25rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.board-section:hover {
    box-shadow: var(--shadow-lg);
    border-color: rgba(99, 102, 241, 0.4);
}

.board-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.board-icon {
    font-size: 1.5rem;
}

.buff-group {
    margin-bottom: 1.25rem;
}

.buff-group:last-child {
    margin-bottom: 0;
}

.buff-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.buff-count {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gold);
    margin-left: 1rem;
    transition: color 0.3s ease;
}

.buff-count.all-completed {
    color: var(--success);
    font-weight: 700;
}

.character-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
    line-height: 1.6;
}

.character-span {
    color: var(--text-primary);
    opacity: 0.4;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.character-span:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.character-span.completed {
    opacity: 1;
    color: var(--accent-primary);
    font-weight: 600;
}

.separator {
    color: var(--text-muted);
    opacity: 0.4;
    margin-right: 0.25rem;
}

/* Footer */
.footer {
    margin-top: 4rem;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

.footer a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .controls {
        grid-template-columns: 1fr;
    }

    .stats {
        flex-wrap: wrap;
    }

    .character-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .title {
        font-size: 2rem;
    }

    /* .header {
        padding: 1rem;
    } */

    .board-section {
        padding: 1rem;
    }

    .progress-bar {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.board-section {
    animation: fadeIn 0.5s ease;
}

.character-span {
    animation: fadeIn 0.3s ease;
}