:root {
    --primary-color: #ff5350;
    /* 포켓몬 레드 */
    --secondary-color: #3b4cca;
    /* 포켓몬 블루 */
    --accent-color: #ffde00;
    /* 포켓몬 옐로우 */
    --bg-dark: #0f172a;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    /* 타입별 색상 */
    --type-normal: #A8A77A;
    --type-fire: #EE8130;
    --type-water: #6390F0;
    --type-electric: #F7D02C;
    --type-grass: #7AC74C;
    --type-ice: #96D9D6;
    --type-fighting: #C22E28;
    --type-poison: #A33EA1;
    --type-ground: #E2BF65;
    --type-flying: #A98FF3;
    --type-psychic: #F95587;
    --type-bug: #A6B91A;
    --type-rock: #B6A136;
    --type-ghost: #735797;
    --type-dragon: #6F35FC;
    --type-dark: #705746;
    --type-steel: #B7B7CE;
    --type-fairy: #D685AD;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-container {
    width: 100%;
    max-width: 1000px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* 배경 장식 */
.bg-blur {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.4;
}

.blur-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: -100px;
    right: -100px;
}

.blur-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-color);
    bottom: -50px;
    left: -50px;
}

/* 헤더 */
header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
    position: relative;
}

.lang-selector {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.lang-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.lang-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
}

.main-title {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

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

/* 검색 섹션 */
.search-section {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
}

.search-box {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px border var(--glass-border);
    padding: 0.5rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 83, 80, 0.4);
}

/* 공통 카드 스타일 (Glassmorphism) */
.glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
}

/* 로딩 & 에러 */
.hidden {
    display: none !important;
}

.spinner-container,
.error-container {
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

.error-container p {
    color: #ff6b6b;
    font-weight: 600;
}

/* 결과 섹션 */
.result-container {
    display: grid;
    gap: 2rem;
    animation: fadeInUp 0.6s ease-out;
}

/* 포켓몬 정보 카드 */
.pokemon-info-card {
    display: flex;
    align-items: center;
    padding: 2rem;
    gap: 2rem;
}

.pokemon-image-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 1rem;
}

.pokemon-image-wrapper img {
    width: 150px;
    height: 150px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.pokemon-details {
    flex: 1;
}

.poke-id {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.poke-name {
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: capitalize;
}

.type-badge-container {
    display: flex;
    gap: 0.5rem;
}

/* 상성 그리드 */
.matchup-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.matchup-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.effectiveness-grid {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.effectiveness-card {
    padding: 1.5rem;
}

.effectiveness-card h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    border-left: 4px solid var(--primary-color);
    padding-left: 0.75rem;
}

.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}

/* 타입 배지 스타일 */
.type-badge {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.multiplier {
    background: rgba(0, 0, 0, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 8px;
}

/* 푸터 */
footer {
    text-align: center;
    margin-top: 4rem;
    color: var(--text-muted);
    padding: 2rem 0;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* 애니메이션 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 반응형 */
@media (max-width: 768px) {
    .pokemon-info-card {
        flex-direction: column;
        text-align: center;
    }

    .main-title {
        font-size: 3rem;
    }

    .type-badge-container {
        justify-content: center;
    }
}