:root {
    --bg-color: #0a0a0c;
    --card-bg: #16161a;
    --accent-gold: #c89b3c;
    --accent-gold-glow: rgba(200, 155, 60, 0.4);
    --win-blue: #28344e;
    --win-text: #5383e8;
    --loss-red: #59343b;
    --loss-text: #e84057;
    --text-primary: #f0f0f0;
    --text-secondary: #9ea3ae;
    --border-color: #2e2e34;
    --font-main: 'Noto Sans KR', sans-serif;
    --font-logo: 'Black Han Sans', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    min-height: 100vh;
}

.bg-texture {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%0A%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}

#app {
    position: relative;
    z-index: 2;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
    background: radial-gradient(circle at center, #1a1a2e 0%, var(--bg-color) 70%);
}

.logo {
    font-family: 'Noto Sans KR', sans-serif;
    font-weight: 900;
    font-size: 5rem;
    margin-bottom: 8px;
    letter-spacing: -3px;
    display: flex;
    gap: 2px;
}

.logo span {
    text-shadow: none; /* 빛 번짐 제거 */
}

.char-t { color: #00FF00; }
.char-r { color: #FF0000; }
.char-bb { color: #FFFF00; }
.char-tt { color: #0000FF; }

.tagline {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-weight: 300;
}

/* Search Box */
.search-box {
    width: 100%;
    max-width: 700px;
}

.search-inner {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 8px 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

.search-inner:focus-within {
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px var(--accent-gold-glow);
}

.region-select {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    padding: 8px;
    cursor: pointer;
    outline: none;
}

.divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 16px;
}

#search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    padding: 12px 0;
    outline: none;
}

.search-btn {
    background: transparent;
    border: none;
    color: var(--accent-gold);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    transition: transform 0.2s;
}

.search-btn:hover {
    transform: scale(1.1);
}

/* Match Cards */
/* User Summary Section */
.user-summary {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    border: 1px solid var(--border-color);
}

.profile-main {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 300px;
}

.profile-icon-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
}

.profile-icon {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    border: 3px solid var(--accent-gold);
}

.profile-level {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: var(--accent-gold);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 900;
    border: 1px solid var(--accent-gold);
}

.profile-info h2 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.profile-info .tag {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* Rank Cards */
.rank-container {
    display: flex;
    gap: 20px;
    flex: 1;
    min-width: 400px;
}

.rank-card {
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    border: 1px solid rgba(255,255,255,0.05);
}

.rank-img {
    width: 60px;
    height: 60px;
}

.rank-text .queue-type {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: block;
}

.rank-text .tier {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.rank-text .lp {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Stats Summary */
.recent-stats {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

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

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

.stat-value {
    font-size: 1.3rem;
    font-weight: 900;
}

.stat-value.win { color: var(--win-text); }
.stat-value.loss { color: var(--loss-text); }

.top-champs {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.top-champ-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.match-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border-left: 6px solid var(--border-color);
    transition: transform 0.2s;
    cursor: pointer;
}

.match-card:hover {
    transform: translateX(4px);
}

.match-card.win {
    background: var(--win-blue);
    border-left-color: var(--win-text);
}

.match-card.loss {
    background: var(--loss-red);
    border-left-color: var(--loss-text);
}

.card-summary {
    display: grid;
    grid-template-columns: 100px 140px 1fr 120px 60px;
    align-items: center;
    padding: 12px 16px;
}

.game-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.game-info .type {
    font-weight: 700;
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
}

.position-badge {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 0.7rem;
    margin-top: 4px;
}

.champ-info-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

.champ-portrait-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
}

.champ-img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.champ-level {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: #000;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.spells-runes-container {
    display: flex;
    gap: 4px;
}

.spells-stack, .runes-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spell-icon, .rune-icon {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

.rune-icon {
    border-radius: 50%;
    background: #000;
}

.main-rune {
    width: 30px;
    height: 30px;
}

.sub-rune {
    width: 20px;
    height: 20px;
    margin: 0 auto;
    opacity: 0.8;
}

.expand-btn {
    text-align: center;
    color: var(--text-secondary);
    transition: transform 0.3s;
}

.match-card.expanded .expand-btn {
    transform: rotate(180deg);
}

.kda-stats {
    font-size: 1.1rem;
    font-weight: 700;
}

.kda-ratio {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.result-info {
    text-align: right;
}

.result-text {
    font-weight: 900;
    font-size: 1.1rem;
}

.win .result-text { color: var(--win-text); }
.loss .result-text { color: var(--loss-text); }

/* Details */
.card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(0,0,0,0.2);
}

.match-card.expanded .card-details {
    max-height: 500px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.details-content {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.player-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.85rem;
}

.player-row img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .card-summary {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .logo { font-size: 3rem; }
    .details-content { grid-template-columns: 1fr; }
}
