/* ---------- VARIABLES ---------- */
:root {
    --bg-grad: linear-gradient(135deg, #0f4c3a 0%, #1a5c47 25%, #2d8f47 50%, #50c878 75%, #6be585 100%);
    --card: rgba(12, 32, 26, 0.55);
    --card-strong: rgba(12, 32, 26, 0.75);
    --text: #eafff4;
    --muted: #c7ffe2;
    --accent: #6be585;
    --accent-strong: #50c878;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

/* ---------- GLOBAL ---------- */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Press Start 2P', monospace;
    background: var(--bg-grad);
    color: var(--text);
    display: grid;
    place-items: center;
    padding: 24px;
}

h1 {
    margin: 0;
    text-transform: uppercase;
}

img {
    image-rendering: pixelated;
}

/* ---------- HEADER ---------- */
header {
    background: var(--card);
    border: 2px solid #0f4c3a;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    opacity: 0;
    transform: translateY(-20px);
    animation: slideDown 0.6s forwards;
    animation-delay: 0.1s;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand .dot {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    background: conic-gradient(from 0deg, #6be585, #2d8f47, #1a5c47, #6be585);
    box-shadow: 0 0 0 2px #0f4c3a inset, 0 0 12px rgba(107, 229, 133, 0.9);
}

/* ---------- SEARCH ---------- */
.search {
    background: var(--card-strong);
    border: 2px solid #0f4c3a;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    opacity: 0;
    transform: translateY(-20px);
    animation: slideDown 0.6s forwards;
    animation-delay: 0.3s;
    margin-bottom: 500px;
    margin-top: 40px;
}

form {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
}

.search-input {
    width: 100%;
    background: rgba(4, 20, 16, 0.85);
    color: var(--text);
    border: 2px solid #1a5c47;
    border-radius: 14px;
    padding: 16px;
    font-size: 14px;
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(107, 229, 133, 0.5);
    transition: all 0.3s ease;
}

.btn,
select {
    padding: 16px 18px;
    border: 2px solid #1a5c47;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #053321;
    cursor: pointer;
    font-size: 12px;
    text-transform: uppercase;
    box-shadow: 0 6px 0 #0f4c3a, 0 10px 20px rgba(0, 0, 0, 0.25);
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #0f4c3a, 0 12px 20px rgba(0, 0, 0, 0.2);
    transition: 0.2s ease;
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 6px 0 #0f4c3a, 0 10px 20px rgba(0, 0, 0, 0.25);
}

/* ---------- RESULTS ---------- */
.results {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

.pokemon-card {
    background: var(--card);
    border: 2px solid #0f4c3a;
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.4s forwards;
}

.pokemon-card:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    transition: 0.2s ease;
}

.pokemon-info {
    font-size: 10px;
}

.pokemon-info h2 {
    font-size: 12px;
    margin: 0 0 6px;
}

.type-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 9px;
    text-transform: uppercase;
    margin-right: 4px;
    margin-bottom: 2px;
}

/* ---------- DETAIL VIEW ---------- */
#detail-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 32, 26, 0.95);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow-y: auto;
    z-index: 100;
    padding: 20px;
    display: none;
}

.detail-content {
    max-width: 900px;
    width: 100%;
    background: var(--card-strong);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

#close-detail {
    padding: 8px 14px;
    margin-bottom: 16px;
    border: 2px solid #1a5c47;
    border-radius: 12px;
    background: var(--accent);
    color: #053321;
    cursor: pointer;
    font-family: inherit;
}

/* ---------- STATS ---------- */
.stats {
    margin: 10px 0;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.stat-name {
    width: 80px;
    font-size: 10px;
    text-transform: uppercase;
}

.stat-bar-container {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    height: 10px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.stat-value {
    width: 24px;
    font-size: 10px;
    text-align: right;
}

/* ---------- MOVES TABS ---------- */
.moves-section {
    margin-top: 12px;
}

.moves-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.tab-btn {
    padding: 6px 12px;
    background: var(--card);
    border: 1px solid var(--accent);
    border-radius: 6px;
    cursor: pointer;
    font-size: 10px;
    text-transform: uppercase;
}

.tab-btn.active {
    background: var(--accent);
    color: #053321;
}

.tab-content {
    font-size: 9px;
    line-height: 1.4;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

/* ---------- ANIMATIONS ---------- */
@keyframes slideDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom themed scrollbar */
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: linear-gradient(135deg, #0f4c3a, #1a5c47);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #2d8f47, #50c878);
  border-radius: 10px;
  border: 2px solid #0f4c3a;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #50c878, #6be585);
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #50c878 #1a5c47;
}
