:root {
    --pogo-blue: #00aaff;
    --pogo-red: #ff4444;
    --pogo-yellow: #ffcc00;
    --pogo-gray: #f8fafc;
    --pogo-text: #f1f5f9;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --border-color: rgba(255, 255, 255, 0.05);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --pogo-text: #1e293b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --border-color: rgba(0, 0, 0, 0.05);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.tool-container {
    max-width: 1300px;
    width: 100% !important;
    margin: 20px auto !important;
    padding: 0 !important;
}

.tool-container .tool-header,
.tool-container .tool-header h1,
.tool-container .tool-header p {
    text-align: left !important;
    margin-left: 0;
}

.tool-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fdd835, #e53935);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}


input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
}


.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}


.selection-panel {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    min-height: 550px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}



.selection-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.selection-header input, 
.selection-header select {
    padding: 0.6rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #f8fafc;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
}

[data-theme="light"] .selection-header input, 
[data-theme="light"] .selection-header select {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

.selection-header input, 
.selection-header select {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--pogo-text);
}

.selection-header input:focus {
    border-color: var(--pogo-blue);
}


.shiny-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shiny-label {
    font-weight: 800;
    font-size: 0.8rem;
    color: #dc2626;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider { background-color: #dc2626; }
input:checked + .slider:before { transform: translateX(18px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }


.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

.selection-panel.is-tall .pokemon-grid {
    max-height: 750px;
}

.pokemon-grid::-webkit-scrollbar { width: 6px; }
.pokemon-grid::-webkit-scrollbar-track { background: transparent; }
.pokemon-grid::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.1); border-radius: 10px; }

.poke-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}



.poke-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--pogo-blue);
}

.poke-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.poke-card span {
    display: block;
    font-size: 0.75rem;
    margin-top: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.pogo-hud {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 30px;
    padding: 2.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    color: var(--pogo-text);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease;
}



.selected-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem;
    background: rgba(0, 170, 255, 0.05);
    padding: 1rem;
    border-radius: 15px;
}

.selected-header img { width: 80px; height: 80px; }
.selected-header h2 { font-weight: 800; font-size: 1.5rem; text-transform: capitalize; }

.hidden { display: none !important; }


.hud-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.05);
    padding: 5px;
    border-radius: 100px;
}

.hud-tab {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 100px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: inherit;
}

.hud-tab.active {
    background: var(--bg-card);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    color: var(--pogo-blue);
}

[data-theme="light"] .hud-tab.active {
    background: #ffffff;
}

.input-card {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-card:focus-within {
    background: var(--bg-card);
    box-shadow: 0 10px 25px rgba(0, 170, 255, 0.1);
    border-color: rgba(0, 170, 255, 0.3);
    transform: translateY(-2px);
}

[data-theme="light"] .input-card:focus-within {
    background: #ffffff;
}

.input-card label { 
    display: block; 
    margin-bottom: 0.75rem; 
    font-weight: 700; 
    font-size: 0.95rem; 
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-card input { 
    width: 100%; 
    padding: 1rem; 
    border-radius: 12px; 
    border: 2px solid var(--border-color); 
    background: var(--bg-primary); 
    font-family: inherit; 
    font-size: 1.5rem; 
    font-weight: 800; 
    color: var(--pogo-blue); 
    text-align: center; 
    transition: all 0.2s;
}

[data-theme="light"] .input-card input {
    background: #f8fafc;
    border-color: rgba(0,0,0,0.05);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.iv-stats-card {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

[data-theme="dark"] .iv-stats-card { background: rgba(255, 255, 255, 0.02); }


input[type=range].iv-pogo-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    background: rgba(0, 170, 255, 0.1);
    border-radius: 100px;
    outline: none;
    margin: 15px 0;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.1s ease;
}

input[type=range].iv-pogo-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 26px;
    height: 26px;
    background: #ffffff;
    cursor: pointer;
    border-radius: 50%;
    border: 4px solid var(--pogo-blue);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    margin-top: -8px; 
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

input[type=range].iv-pogo-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type=range].iv-pogo-slider:active::-webkit-slider-thumb {
    transform: scale(0.95);
}


.exact-output {
    text-align: center;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    padding: 2.5rem 1.5rem;
    border-radius: 30px;
    color: #ffffff;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(2, 132, 199, 0.2);
    position: relative;
    overflow: hidden;
}

.exact-output::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.output-label { font-size: 0.8rem; opacity: 0.9; margin-bottom: 5px; }
.output-value { font-size: 3.5rem; font-weight: 800; line-height: 1; margin-bottom: 5px; }

.ai-coach-box {
    margin-top: 20px;
    background: rgba(0, 170, 255, 0.03);
    border-left: 5px solid #00aaff;
    border-radius: 20px;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.ai-coach-box:hover {
    background: rgba(0, 170, 255, 0.06);
    box-shadow: 0 8px 20px rgba(0, 170, 255, 0.1);
    transform: translateX(5px);
}

.ai-header { font-weight: 800; color: #00aaff; margin-bottom: 0.5rem; display: flex; align-items: center; gap: 8px; }



input[type="range"] { 
    -webkit-appearance: none; 
    appearance: none;
    width: 100%; 
    background: transparent; 
}
input[type="range"]::-webkit-slider-runnable-track { width: 100%; height: 6px; background: rgba(0, 0, 0, 0.1); border-radius: 100px; }
[data-theme="dark"] input[type="range"]::-webkit-slider-runnable-track { background: rgba(255, 255, 255, 0.1); }
input[type="range"]::-webkit-slider-thumb { 
    -webkit-appearance: none; 
    appearance: none;
    height: 18px; 
    width: 18px; 
    border-radius: 50%; 
    background: #00aaff; 
    cursor: pointer; 
    margin-top: -6px; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); 
}


.evo-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.02);
    padding: 1rem;
    border-radius: 15px;
    margin-bottom: 10px;
}

[data-theme="dark"] .evo-card { background: rgba(255, 255, 255, 0.03); }

.evo-info { display: flex; align-items: center; gap: 10px; }
.evo-img { width: 50px; height: 50px; }
.evo-cp-box { background: var(--pogo-blue); color: white; padding: 5px 12px; border-radius: 10px; font-weight: 800; }


@media (max-width: 1024px) {
    .tool-grid { grid-template-columns: 1fr; }
}


.bc-guide-box {
    margin: 40px 0;
    width: 100%;
}

.bc-guide-box {
    margin-top: 3rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.bc-guide-box details { width: 100%; }

.bc-guide-box summary {
    padding: 1.25rem 1.5rem;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--pogo-text);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-primary);
    transition: background .2s;
}

.bc-guide-box summary::-webkit-details-marker { display: none; }
.bc-guide-box summary:hover { background: var(--border-color); }

.bc-guide-box summary::after {
    content: "▼";
    font-size: 0.8rem;
    color: var(--pogo-blue);
    transition: transform 0.3s ease;
}

.bc-guide-box details[open] summary::after { transform: rotate(180deg); }
.bc-guide-box details[open] summary { border-bottom: 1px solid var(--border-color); }

.bc-guide-content {
    padding: 2rem;
    line-height: 1.8;
    color: #94a3b8;
    font-size: 1rem;
}

[data-theme="light"] .bc-guide-content {
    color: #475569;
}

.bc-guide-content h2 { color: var(--pogo-text); margin: 2.5rem 0 1rem; font-size: 1.5rem; font-weight: 800; }
.bc-guide-content h3 { color: #dc2626; margin: 2rem 0 1rem; font-size: 1.25rem; font-weight: 800; }
.bc-guide-content h2:first-child, .bc-guide-content h3:first-child { margin-top: 0; }
.bc-guide-content p { margin-bottom: 1.5rem; }
.bc-guide-content ul, .bc-guide-content ol { margin: 0 0 1.5rem 1.5rem; padding: 0; }
.bc-guide-content li { margin-bottom: 0.75rem; }
.bc-guide-content li strong { color: var(--pogo-text); }
