:root {
    --primary: #6c5ce7;
    --primary-dark: #4a3fcf;
    --secondary: #a29bfe;
    --bg-dark: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252542;
    --text-primary: #ffffff;
    --text-secondary: #b2b2cc;
    --accent-aero: #00d4aa;
    --accent-fusion: #ff6b9d;
    --accent-spectro: #ffd700;
    --accent-electro: #845ef7;
    --accent-glacio: #74c0fc;
    --accent-havoc: #ff4757;
    --tier-ss: #ff4757;
    --tier-s: #ff7f50;
    --tier-a: #ffd700;
    --tier-b: #7bed9f;
    --tier-c: #a4b0be;
    --tier-d: #636e72;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
}

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

/* Back to Hub Link */
.back-to-hub {
    background: rgba(0,0,0,0.3);
    padding: 10px 0;
    border-bottom: 1px solid rgba(108,92,231,0.2);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--primary);
}

.back-link span {
    font-size: 1.1rem;
}

/* Main Layout with Sidebar */
.main-layout {
    display: flex;
    gap: 30px;
    padding-top: 20px;
    padding-bottom: 40px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* Sidebar */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-section {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(108,92,231,0.2);
}

.sidebar-section h3 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(108,92,231,0.3);
}

/* Game Links */
.game-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.game-link:hover {
    background: rgba(108,92,231,0.2);
    border-color: var(--primary);
    transform: translateX(5px);
}

.game-link.hub {
    background: linear-gradient(135deg, rgba(108,92,231,0.3) 0%, rgba(162,155,254,0.2) 100%);
    border-color: var(--primary);
}

.game-link .game-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
}

.game-link .game-info {
    display: flex;
    flex-direction: column;
}

.game-link .game-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.game-link .game-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Quick Links */
.quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-links a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.quick-links a:hover {
    background: rgba(108,92,231,0.15);
    color: var(--text-primary);
    border-left-color: var(--primary);
    padding-left: 15px;
}

/* Header */
header {
    background: linear-gradient(180deg, rgba(108,92,231,0.3) 0%, transparent 100%);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

@keyframes wave {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

.logo h1 {
    font-size: 1.5rem;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 500;
}

nav a:hover {
    color: var(--text-primary);
    background: var(--primary);
}

/* Update Banner */
.update-banner {
    background: linear-gradient(to bottom, rgba(15,15,26,0.85), rgba(15,15,26,0.95)),
                url('../images/banner.avif');
    background-size: cover;
    background-position: top center;
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(108,92,231,0.3);
    min-height: auto;
}

.update-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(108,92,231,0.3) 0%, rgba(162,155,254,0.1) 100%);
    pointer-events: none;
}

.update-badge {
    background: var(--accent-havoc);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
}

.update-banner h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.update-banner p {
    color: #e0e0e0;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

.version-events {
    margin-top: 25px;
    text-align: left;
}

.version-events h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.event-card {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(108,92,231,0.3);
    transition: all 0.3s ease;
}

.event-card:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-3px);
}

.event-card img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    margin-bottom: 10px;
    background: rgba(0,0,0,0.3);
}

.event-card h4 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.event-card p {
    color: #ccc;
    font-size: 0.75rem;
    margin-bottom: 8px;
    text-shadow: none;
}

.event-date {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.update-date {
    display: block;
    margin-top: 15px;
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Quick Navigation */
.quick-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.nav-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.nav-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.nav-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.nav-label {
    font-weight: 600;
    color: var(--text-secondary);
}

/* AI Articles Nav Card */
.nav-card-articles {
    background: linear-gradient(135deg, rgba(108,92,231,0.3) 0%, rgba(162,155,254,0.2) 100%);
    border: 1px solid rgba(108,92,231,0.4);
    position: relative;
    overflow: hidden;
}

.nav-card-articles::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(108,92,231,0.2) 0%, transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
}

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

.nav-card-articles:hover {
    background: linear-gradient(135deg, rgba(108,92,231,0.4) 0%, rgba(162,155,254,0.3) 100%);
    border-color: var(--secondary);
    box-shadow: 0 0 30px rgba(108,92,231,0.3);
}

.nav-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-havoc);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.65rem;
    font-weight: bold;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Content Sections */
.content-section {
    margin: 50px 0;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 15px;
}

.content-section h2 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.section-desc {
    color: var(--text-secondary);
    margin-bottom: 25px;
}

/* Tier List */
.tier-table {
    margin: 20px 0;
    overflow-x: auto;
}

.tier-table table {
    width: 100%;
    border-collapse: collapse;
}

.tier-table th, .tier-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.tier-table th {
    background: rgba(108,92,231,0.2);
    color: var(--primary);
    font-weight: 600;
}

.tier-ss td:first-child { border-left: 4px solid var(--tier-ss); }
.tier-s td:first-child { border-left: 4px solid var(--tier-s); }
.tier-a td:first-child { border-left: 4px solid var(--tier-a); }
.tier-b td:first-child { border-left: 4px solid var(--tier-b); }
.tier-c td:first-child { border-left: 4px solid var(--tier-c); }
.tier-d td:first-child { border-left: 4px solid var(--tier-d); }

.role-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tier-column {
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 10px;
}

.tier-column h3 {
    color: var(--secondary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.tier-column table {
    width: 100%;
}

.tier-column td {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tier-ss { color: var(--tier-ss); font-weight: bold; }
.tier-s { color: var(--tier-s); font-weight: bold; }
.tier-a { color: var(--tier-a); font-weight: bold; }
.tier-b { color: var(--tier-b); font-weight: bold; }
.tier-c { color: var(--tier-c); font-weight: bold; }
.tier-d { color: var(--tier-d); font-weight: bold; }

/* Character Grid - Like wuthering.gg */
.character-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.character-grid a {
    text-decoration: none;
    color: inherit;
}

.character-card {
    background: transparent;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.character-card:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-5px);
}

.character-card.new {
    background: rgba(255,71,87,0.1);
}

.char-img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    background: rgba(0,0,0,0.4);
    padding: 15px;
}

.character-card h3 {
    font-size: 1.3rem;
    margin: 10px 0 5px;
    font-weight: 600;
    color: #fff;
}

.char-weapon, .char-role {
    color: #999;
    font-size: 1rem;
    margin: 3px 0;
}

.char-element {
    display: none;
}

.character-grid a {
    text-decoration: none;
    color: inherit;
}

/* Teams Section */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.team-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(108,92,231,0.2);
    transition: all 0.3s ease;
}

.team-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.team-card h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.team-members {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.team-char {
    background: rgba(108,92,231,0.2);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Character Card Grid - Pokopedia Style */
.character-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.character-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(108,92,231,0.2);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.character-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.character-card-image {
    height: 120px;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.character-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.character-card:hover .character-card-image img {
    transform: scale(1.1);
}

.character-card-content {
    padding: 15px;
    text-align: center;
}

.character-card-name {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.character-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
}

/* Element Badges */
.element-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

.element-badge.glacio { background: #74c0fc; }
.element-badge.fusion { background: #ff6b6b; }
.element-badge.electro { background: #845ef7; }
.element-badge.aero { background: #69db7c; }
.element-badge.spectro { background: #ffd43b; color: #333; }
.element-badge.havoc { background: #ff4757; }

/* Rarity Badges */
.rarity-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.rarity-badge.five {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    color: #333;
}

.rarity-badge.four {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
}

.team-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .character-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 900px) {
    .character-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 600px) {
    .character-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Responsive Sidebar */
@media (max-width: 1100px) {
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        order: -1;
    }
    
    .sidebar-section {
        margin-bottom: 15px;
    }
    
    .game-links {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .game-link {
        flex: 1;
        min-width: 200px;
    }
    
    .quick-links {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .quick-links a {
        flex: 1;
        min-width: 140px;
    }
}

@media (max-width: 600px) {
    .game-link {
        min-width: 100%;
    }
    
    .quick-links a {
        min-width: 100%;
    }
}

.character-card {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    overflow: visible;
}

.character-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    background: rgba(0,0,0,0.4);
}

.character-card.new {
    border-color: var(--accent-havoc);
    box-shadow: 0 0 20px rgba(255,71,87,0.3);
}

.char-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-havoc);
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.char-element {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    min-height: 25px;
    line-height: 17px;
}

.char-element.aero { background: var(--accent-aero); color: #000; }
.char-element.fusion { background: var(--accent-fusion); color: #000; }
.char-element.spectro { background: var(--accent-spectro); color: #000; }
.char-element.electro { background: var(--accent-electro); color: #fff; }
.char-element.glacio { background: var(--accent-glacio); color: #000; }
.char-element.havoc { background: var(--accent-havoc); color: #fff; }

.char-img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
}

.character-card h3 {
    font-size: 1rem;
    margin: 5px 0 3px;
    font-weight: 600;
}

.char-weapon, .char-role {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin: 2px 0;
}

@media (max-width: 1400px) {
    .character-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 1000px) {
    .character-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 700px) {
    .character-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 500px) {
    .character-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}



.character-card {
    background: rgba(0,0,0,0.3);
    padding: 10px 8px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    overflow: hidden;
}

.character-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    background: rgba(0,0,0,0.4);
}

.character-card.new {
    border-color: var(--accent-havoc);
    box-shadow: 0 0 20px rgba(255,71,87,0.3);
}

.char-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-havoc);
    color: white;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.char-element {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.char-element.aero { background: var(--accent-aero); color: #000; }
.char-element.fusion { background: var(--accent-fusion); color: #000; }
.char-element.spectro { background: var(--accent-spectro); color: #000; }
.char-element.electro { background: var(--accent-electro); color: #fff; }
.char-element.glacio { background: var(--accent-glacio); color: #000; }
.char-element.havoc { background: var(--accent-havoc); color: #fff; }

.char-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 4px;
}

.character-card h3 {
    font-size: 0.7rem;
    margin: 2px 0 1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.char-weapon, .char-role {
    color: var(--text-secondary);
    font-size: 0.65rem;
    margin: 1px 0;
    word-wrap: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.char-stats {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--secondary);
}

/* Team Cards */
.team-list {
    display: grid;
    gap: 20px;
    margin-top: 25px;
}

.team-card {
    background: rgba(0,0,0,0.3);
    padding: 25px;
    border-radius: 12px;
    position: relative;
    border-left: 4px solid var(--primary);
}

.team-rank {
    position: absolute;
    top: 15px;
    right: 20px;
    background: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.team-card h3 {
    color: var(--secondary);
    margin-bottom: 15px;
    padding-right: 50px;
}

.team-comp {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.team-member {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.team-member.main-dps { background: var(--accent-fusion); color: #000; }
.team-member.sub-dps { background: var(--accent-electro); color: #fff; }
.team-member.support { background: var(--accent-aero); color: #000; }

.team-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Combat Rotation */
.rotation-card {
    background: rgba(0,0,0,0.3);
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
}

.rotation-card h3 {
    color: var(--secondary);
    margin-bottom: 20px;
}

.rotation-steps {
    display: grid;
    gap: 15px;
}

.step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(108,92,231,0.1);
    border-radius: 10px;
}

.step-num {
    background: var(--primary);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.rules-list {
    list-style: none;
}

.rules-list li {
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
}

.rules-list li strong {
    color: var(--primary);
}

/* Weapons */
.weapon-list {
    display: grid;
    gap: 20px;
}

.weapon-card {
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border-radius: 12px;
}

.weapon-card h3 {
    color: var(--secondary);
    margin-bottom: 15px;
}

.weapon-card table {
    width: 100%;
    border-collapse: collapse;
}

.weapon-card th, .weapon-card td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.weapon-card th {
    color: var(--primary);
    font-weight: 600;
}

/* Echo Sets */

/* Version Timeline */
.version-timeline {
    display: grid;
    gap: 20px;
}

.version-item {
    background: rgba(0,0,0,0.3);
    padding: 25px;
    border-radius: 12px;
    position: relative;
    border-left: 4px solid var(--secondary);
}

.version-item.current {
    border-left-color: var(--primary);
    background: linear-gradient(90deg, rgba(108,92,231,0.2) 0%, transparent 100%);
}

.version-badge {
    position: absolute;
    top: 15px;
    right: 20px;
    background: var(--primary);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: bold;
}

.version-item h3 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.version-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.version-item ul {
    list-style: none;
}

.version-item li {
    padding: 5px 0;
    color: var(--text-secondary);
}

/* Banner Schedule */
.banner-schedule {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.banner-card {
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border-radius: 12px;
    border-top: 4px solid var(--primary);
}

.banner-card.phase-1 { border-top-color: var(--accent-aero); }
.banner-card.phase-2 { border-top-color: var(--accent-fusion); }
.banner-card.future { border-top-color: var(--secondary); }

.banner-card h3 {
    margin-bottom: 5px;
}

.banner-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: block;
}

.banner-card ul {
    list-style: none;
}

.banner-card li {
    padding: 8px 0;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.char-name {
    color: var(--text-primary);
    font-weight: 600;
}

/* Footer */
footer {
    background: var(--bg-card);
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    margin: 5px 0;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    nav {
        justify-content: center;
    }
    
    .quick-nav {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-section {
        padding: 20px 15px;
    }
    
    .team-comp {
        flex-direction: column;
    }
    
    .team-member {
        text-align: center;
    }
}

/* Tier list character display */
.tier-char-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.tier-char {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 14px;
    color: inherit;
    text-decoration: none;
}

.tier-char-list a {
    text-decoration: none;
    color: inherit;
}

.tier-char-list a:hover .tier-char {
    background: rgba(255,255,255,0.15);
}

.tier-char img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.2);
}

/* Echoes Section */
.echo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.echo-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(255,255,255,0.05);
}

.echo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(108,92,231,0.3);
    border-color: var(--primary);
}

.echo-card img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: contain;
    margin-bottom: 10px;
}

.echo-card h4 {
    font-size: 1rem;
    margin-bottom: 6px;
    text-align: center;
}

.echo-card .sonata {
    font-size: 0.8rem;
    color: var(--secondary);
    margin-bottom: 8px;
    text-align: center;
}

.echo-card .echo-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.4;
}

.echo-categories h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 8px;
}

.sonata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.sonata-card {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
    transition: border-color 0.2s;
}

.sonata-card:hover {
    border-color: var(--primary);
}

.sonata-card h4 {
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--primary);
}

.sonata-card .sonata-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Filters Container */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    background: var(--bg-card);
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid rgba(255,255,255,0.05);
}

.search-box {
    flex: 1;
    min-width: 200px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108,92,231,0.2);
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-group select {
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    min-width: 120px;
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.reset-btn {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.reset-btn:hover {
    background: var(--primary-dark);
}

@media (max-width: 768px) {
    .filters-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        width: 100%;
    }
    
    .echo-grid {
        grid-template-columns: 1fr;
    }
    
    .sonata-grid {
        grid-template-columns: 1fr;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.close-modal:hover {
    color: var(--text-primary);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(180deg, rgba(108,92,231,0.2) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.modal-header img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--bg-dark);
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.modal-element {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.modal-body {
    padding: 25px;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h3 {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-section pre {
    background: var(--bg-dark);
    padding: 15px;
    border-radius: 8px;
    font-family: 'Consolas', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    line-height: 1.6;
}

.rating-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--bg-dark);
}

.sonata-list {
    color: var(--accent-aero);
    font-weight: 500;
}

@media (max-width: 600px) {
    .modal-header {
        flex-direction: column;
        text-align: center;
    }
    
    .modal-header img {
        width: 60px;
        height: 60px;
    }
}

/* Weapons Grid */
.weapon-category-title {
    margin-top: 30px;
    margin-bottom: 20px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    font-size: 1.3rem;
}

.weapon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.weapon-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
}

.weapon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(108,92,231,0.3);
    border-color: var(--primary);
}

.weapon-card img {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: contain;
    margin-bottom: 10px;
    background: var(--bg-dark);
}

.weapon-card h4 {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.weapon-rarity {
    font-size: 0.8rem;
    color: #ffd700;
    margin-bottom: 3px;
}

.weapon-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(108,92,231,0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Weapon Modal */
.weapon-modal-content {
    max-width: 500px;
}

.weapon-modal-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: linear-gradient(180deg, rgba(108,92,231,0.2) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.weapon-modal-header img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--bg-dark);
}

.weapon-modal-header h2 {
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.weapon-modal-rarity {
    font-size: 1rem;
    display: block;
    margin-bottom: 5px;
}

.weapon-modal-type {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    font-size: 0.75rem;
}

.weapon-modal-stats {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-primary);
}

.weapon-modal-body {
    padding: 25px;
}

/* Filters Container */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
}

/* Character Modal */
.character-modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.character-modal-header img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.character-modal-info h2 {
    font-size: 1.6rem;
    margin-bottom: 5px;
}

.character-modal-rarity {
    font-size: 1rem;
    color: #ffd700;
    display: block;
    margin-bottom: 8px;
}

.character-modal-element {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 8px;
    color: #000;
}

.character-modal-weapon {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
}

.character-modal-faction,
.character-modal-birthday {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 8px;
}

.character-modal-body {
    padding: 25px;
}

.character-modal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat-box {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-box .stat-icon {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 5px;
}

.stat-box .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

.stat-box .stat-value {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--text-primary);
    display: block;
    margin-top: 3px;
}

.build-info {
    background: rgba(108,92,231,0.1);
    padding: 15px;
    border-radius: 10px;
}

.build-info p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.build-info strong {
    color: var(--text-primary);
}

.materials-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.material-item {
    background: rgba(0,0,0,0.3);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .character-modal-header {
        flex-direction: column;
        text-align: center;
    }
    
    .character-modal-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Character Table - Game8 Style */
.character-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    background: #1a1a2e;
    border-radius: 12px;
    overflow: hidden;
}

.character-table th {
    background: #252540;
    color: #fff;
    padding: 18px 15px;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #333;
}

.character-table td {
    padding: 15px;
    border-bottom: 1px solid #333;
    color: #ccc;
    font-size: 0.95rem;
}

.character-table tr:hover {
    background: rgba(255,255,255,0.05);
}

.character-table tr:last-child td {
    border-bottom: none;
}

.character-table a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.character-table a:hover {
    color: #6ee7ff;
}

.character-table img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(0,0,0,0.3);
    padding: 8px;
}

.element-icon {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.element-icon.glacio { background: #74c0fc; color: #000; }
.element-icon.fusion { background: #ff6b9d; color: #fff; }
.element-icon.electro { background: #845ef7; color: #fff; }
.element-icon.aero { background: #00d4aa; color: #000; }
.element-icon.spectro { background: #ffd700; color: #000; }
.element-icon.havoc { background: #ff4757; color: #fff; }
