/* Core Variables */
:root {
    --bg-black: #050505;
    --card-black: #121212;
    --card-hover: #1e1e1e;
    --text-white: #FFFFFF;
    --text-gray: #AAAAAA;
    --accent-orange: #FF8C00;
    --accent-orange-glow: rgba(255, 140, 0, 0.4);
}

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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-black);
    color: var(--text-white);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 40px;
    background-color: var(--card-black);
    border-bottom: 1px solid #333;
    position: sticky; top: 0; z-index: 100;
}
.logo { font-size: 20px; font-weight: 700; color: #fff; }
.logo .text { color: #fff; }
.nav-links { display: flex; gap: 5px; flex-wrap: wrap; }
.nav-links a {
    color: var(--text-gray); text-decoration: none; padding: 10px 12px; font-weight: 600; transition: 0.3s; font-size: 14px;
    border-radius: 5px;
}
.nav-links a:hover { background-color: rgba(255, 255, 255, 0.05); color: #fff; }
.nav-links a.active-nav { color: var(--accent-orange); background-color: rgba(255, 140, 0, 0.1); }

.language-selector {
    color: var(--text-white);
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    padding: 5px 10px;
}



/* Pool Search */
.search-box {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
}
.top-search {
    background: transparent;
    border: none;
    border-bottom: 2px solid #333;
    color: var(--text-white);
    padding: 10px 0;
    border-radius: 0;
    outline: none;
    transition: 0.3s;
    width: 100%;
    max-width: 500px;
    font-family: inherit;
    font-size: 18px;
}
.top-search:focus { border-color: var(--accent-orange); }

/* Main Container */
.container { max-width: 1300px; margin: 30px auto; padding: 0 20px; }

/* Sections */
.content-section { display: none; }
.active-section { display: block; animation: fadeIn 0.5s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.instructions { text-align: center; margin-bottom: 30px; }
.instructions p { color: var(--text-gray); margin-top: 5px; }

/* Breeding Arena (The Top 3 Cards) */
.breeding-arena {
    display: flex; align-items: center; justify-content: center; gap: 20px;
    margin-bottom: 30px;
}
@media (max-width: 768px) { .breeding-arena { flex-direction: column; } }

.slot-card {
    background: var(--bg-black); border: 2px solid var(--text-gray); border-radius: 15px;
    width: 220px; height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s ease; position: relative;
}
.slot-card.active-slot {
    border-color: var(--accent-orange); box-shadow: 0 0 20px var(--accent-orange-glow); transform: scale(1.05);
}
.child-slot { border-color: #333; cursor: default; }
.child-slot.has-result { border-color: var(--accent-orange); background: #1a0f00; }

.slot-label { position: absolute; top: 15px; font-weight: bold; color: var(--text-gray); font-size: 14px; }
.active-slot .slot-label { color: var(--accent-orange); }

.slot-content { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 20px; }
.placeholder-icon, .placeholder-text { font-size: 40px; color: #444; font-weight: 700; opacity: 0.6; }
.placeholder-text { font-size: 32px; text-transform: uppercase; letter-spacing: 2px; }

.selected-img { width: 120px; height: 120px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5)); }
.selected-name { font-weight: bold; font-size: 18px; text-transform: capitalize; }

.operator { font-size: 40px; font-weight: 700; color: var(--accent-orange); }

/* Controls */
.controls { text-align: center; margin-bottom: 40px; }
.reset-btn {
    background: transparent; border: 1px solid var(--text-gray); color: var(--text-white);
    padding: 10px 25px; border-radius: 20px; cursor: pointer; transition: 0.3s;
}
.reset-btn:hover { border-color: var(--accent-orange); color: var(--accent-orange); }

/* Pokémon Grid (The 200 Pool) */
.pool-container h3 { margin-bottom: 20px; text-align: center; border-bottom: 1px solid #333; padding-bottom: 10px; }
.pokemon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 15px; }

/* Directory Header */
.directory-header {
    text-align: center;
    margin-bottom: 40px;
}
.directory-header h1 {
    font-size: 28px;
    font-weight: 700;
}
.directory-header h1 span {
    color: var(--accent-orange);
}
.directory-header p {
    color: var(--text-gray);
    margin-top: 10px;
    font-size: 14px;
}

/* Filter Container */
.filter-container {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.filter-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 150px;
}

.search-item {
    flex: 2;
}

.filter-item label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-white);
}

.directory-input, .directory-select {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: 0.3s;
}

.directory-input:focus, .directory-select:focus {
    border-color: #40E0D0;
}

.element-filter, .work-filter {
    margin-bottom: 20px;
}

.element-filter h3, .work-filter h3 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-white);
}

.element-icons, .work-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-icon {
    width: 32px;
    height: 32px;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    font-size: 16px;
}

.filter-icon:hover, .filter-icon.active {
    border-color: #40E0D0;
    background: rgba(64, 224, 208, 0.1);
}

/* Enhanced Poke Card */
.poke-card {
    background: var(--card-black);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 220px;
}

.poke-card:hover {
    border-color: #40E0D0;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    background: rgba(64, 224, 208, 0.05);
}

.card-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.type-icons-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.work-icons-right {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.work-mini-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--text-gray);
    font-weight: 600;
}

.mini-type-icon {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.card-img {
    width: 85px;
    height: 85px;
    object-fit: contain;
    margin: 5px 0;
    transition: 0.3s;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.poke-card:hover .card-img {
    transform: scale(1.15);
}

.poke-info {
    text-align: center;
    margin-top: auto;
    margin-bottom: 12px;
}

.poke-name {
    display: block;
    font-weight: 700;
    text-transform: capitalize;
    color: #fff;
    font-size: 15px;
}

.poke-number {
    display: inline-block;
    font-size: 11px;
    color: var(--text-gray);
    margin-top: 2px;
}

.card-footer {
    width: 100%;
}

.rarity-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 4px 10px;
    width: 100%;
}

.rarity-value {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.rarity-text {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Rarity colors */
.common .rarity-text { color: #aaaaaa; }
.rare .rarity-text { color: #3399ff; }
.epic .rarity-text { color: #bb66ff; }
.legendary .rarity-text { color: #ffcc00; }

.rarity-badge.common { border-color: rgba(170, 170, 170, 0.3); }
.rarity-badge.rare { border-color: rgba(51, 153, 255, 0.3); border-bottom: 2px solid #3399ff; }
.rarity-badge.epic { border-color: rgba(187, 102, 255, 0.3); border-bottom: 2px solid #bb66ff; }
.rarity-badge.legendary { border-color: rgba(255, 204, 0, 0.4); border-bottom: 2px solid #ffcc00; }

/* Responsive Grid Adjustments */
@media (max-width: 600px) {
    .pokemon-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

/* Placeholders for other pages */
.placeholder-box { background: var(--card-black); padding: 50px; text-align: center; border-radius: 10px; color: var(--text-gray); margin-top: 20px;}
