:root {
    --bg-dark: #0a0e17;
    --bg-card: rgba(20, 26, 40, 0.6);
    --bg-card-hover: rgba(30, 38, 56, 0.8);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(100, 200, 255, 0.4);

    --text-main: #f0f4f8;
    --text-muted: #94a3b8;

    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-gradient: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --blob-1: #3b82f640;
    --blob-2: #8b5cf640;
    --blob-3: #ec489940;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0) 0%, var(--bg-dark) 100%);
    z-index: -1;
    pointer-events: none;
}

.background-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -2;
    animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 40vw;
    height: 40vw;
    background: var(--blob-1);
    animation-delay: 0s;
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: var(--blob-2);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 30vw;
    height: 30vw;
    background: var(--blob-3);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(5%, 5%) scale(1.1);
    }

    100% {
        transform: translate(-5%, -5%) scale(0.9);
    }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
.top-bar {
    width: 100%;
    background: rgba(8, 12, 21, 0.85); /* Premium glass background */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

#logoImg {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5)); /* Restore purple shadow */
    transition: transform 0.3s ease;
}

.logo:hover #logoImg {
    transform: rotate(5deg) scale(1.08);
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

.text-tft {
    color: #ffffff; /* White color for TFT */
    font-weight: 800;
}

.text-emblem {
    background: var(--accent-gradient); /* Premium blue-to-purple brand gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 600;
    text-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.header-stats {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.stat-badge {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.update-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
    position: relative;
    padding-left: 1.8rem;
}

.update-badge::before {
    content: '';
    position: absolute;
    left: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 10px var(--success);
}

/* Controls */
.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 300px;
}

input,
select {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

input:focus,
select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

/* Custom Select Dropdown Styling */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-wrapper::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.2rem;
    height: 1.2rem;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M3 12h18M3 6h18M3 18h12'/></svg>");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: 2;
    transition: all 0.3s ease;
}

.custom-select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-left: 3.2rem !important;
    padding-right: 3rem !important;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 1.25rem center !important;
    background-size: 1.1rem !important;
    cursor: pointer;
}

.custom-select-wrapper:hover::before {
    filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.8)) brightness(1.2);
}

.custom-select-wrapper:hover select {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

/* Comps Grid */
.comps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.comp-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 1.2rem;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comp-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 2rem;
}

.comp-card-info-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    flex-grow: 1;
}

.comp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.comp-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    border-color: var(--border-glow);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(59, 130, 246, 0.1);
}

.comp-card:hover::before {
    transform: scaleX(1);
}

.comp-header {
    min-width: 200px;
    flex-shrink: 0;
}

.comp-tier {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.tier-s {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.tier-a {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.tier-b {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.comp-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

/* Core Traits Badges */
.core-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.3rem;
    width: 100%;
}

.trait-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
    padding: 0.25rem 0.6rem 0.25rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.trait-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.trait-count {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 0.3rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
}

.trait-name {
    color: var(--text-main);
    opacity: 0.9;
}

/* Trait Styles (Prismatic, Gold, Silver, Bronze) */

/* Bronze/Standard (Style 1) */
.trait-style-1 {
    border-color: rgba(205, 127, 50, 0.3);
}
.trait-style-1 .trait-count {
    background: #cd7f32;
    color: #2a1500;
}

/* Silver (Style 2) */
.trait-style-2 {
    border-color: rgba(192, 192, 192, 0.4);
    box-shadow: 0 0 5px rgba(192, 192, 192, 0.1);
}
.trait-style-2 .trait-count {
    background: #e2e8f0;
    color: #0f172a;
}

/* Gold (Style 3) */
.trait-style-3 {
    border-color: rgba(245, 158, 11, 0.5);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.15);
}
.trait-style-3 .trait-count {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #451a03;
}

/* Prismatic (Style 4) */
.trait-style-4 {
    border-color: rgba(236, 72, 153, 0.6);
    background: rgba(236, 72, 153, 0.08);
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.3);
    animation: pulse-glow 3s infinite ease-in-out;
}
.trait-style-4 .trait-count {
    background: linear-gradient(135deg, #c084fc, #ec4899, #60a5fa);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 12px rgba(236, 72, 153, 0.2); }
    50% { box-shadow: 0 0 20px rgba(236, 72, 153, 0.5); border-color: rgba(236, 72, 153, 0.8); }
}


.comp-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 0.8rem 1.2rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0.8rem;
    min-width: 360px;
    flex-shrink: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

.good-stat {
    color: var(--success);
}

.avg-stat {
    color: var(--warning);
}

.bad-stat {
    color: var(--danger);
}

.core-units {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: flex-start;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.2rem;
}

.unit-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.4rem 1rem 0.4rem 0.4rem;
    border-radius: 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.unit-pill img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.unit-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.unit-card-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.unit-mini-items {
    display: flex;
    gap: 3px;
    background: rgba(0, 0, 0, 0.4);
    padding: 3px 5px;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
}

.mini-item-icon {
    width: 18px;
    height: 18px;
    border-radius: 0.25rem;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.mini-item-icon:hover {
    transform: scale(1.7);
    z-index: 10;
    border-color: var(--accent-secondary);
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}


/* Loading Spinner */
.loading-spinner {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

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

/* Tabs */
.tabs {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    padding: 0.5rem 1.2rem;
    border-radius: 2rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.06);
}

.tab-btn.active {
    background: var(--accent-gradient); /* Premium purple/blue brand gradient */
    color: #ffffff; /* White text for contrast */
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.45); /* Glowing purple shadow */
}

.tab-btn::after {
    display: none; /* Disable underline indicator */
}

/* Emblems Grid & Cards */
.emblems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.5s ease;
}

.emblem-card {
    border-top: 3px solid var(--accent-primary) !important;
}

.emblem-stats {
    grid-template-columns: repeat(3, 1fr) !important;
    min-width: 0 !important;
    width: 100% !important;
}

.emblem-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
}

.emblem-header img {
    width: 48px;
    height: 48px;
    border-radius: 0.8rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-glass);
    padding: 0.3rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.emblem-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: var(--text-main);
}

.emblem-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

.emblem-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
}

.emblem-count span {
    color: var(--text-main);
    font-weight: 600;
}

.emblem-champ-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.5rem;
    font-weight: 700;
}

.emblem-champs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.emblem-champ-pill {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2rem;
    padding: 0.4rem 1rem 0.4rem 0.4rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.emblem-champ-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.emblem-champ-pill img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.neutral-stat {
    color: var(--text-main);
}


/* Items Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 1.2rem;
    padding: 1.5rem;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.item-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(139, 92, 246, 0.1);
    transform: translateY(-3px);
}

.character-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.character-header img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-secondary);
}

.character-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin: 0;
}

.items-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.6rem 1rem;
    border-radius: 0.8rem;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.item-info img {
    width: 28px;
    height: 28px;
    border-radius: 0.4rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.item-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.item-stats {
    text-align: right;
    font-size: 0.8rem;
}

.item-count {
    color: var(--text-muted);
}

.item-placement {
    font-weight: 700;
}

/* All Items Gallery */
.all-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 1rem;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.gallery-item img {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

.gallery-item-info {
    display: flex;
    flex-direction: column;
}

.gallery-item-name {
    font-size: 0.95rem;
    font-weight: 600;
}

.gallery-item-raw {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
    margin-top: 0.2rem;
    word-break: break-all;
}

footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-glass);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Emblem Recommender */
.recommender-header {
    text-align: center;
    margin-bottom: 2rem;
}

.recommender-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.recommender-header p {
    color: var(--text-muted);
}

.recommender-emblems-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    width: 100%;
}

.emblem-recommender-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    width: 100%;
    flex-wrap: wrap;
}

.emblem-select-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-glass);
    border-radius: 1rem;
    padding: 0.6rem 0.4rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 90px;
    height: 96px;
    flex-shrink: 0;
}

.emblem-select-btn img {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    object-fit: cover;
}

.emblem-select-btn span {
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-muted);
    line-height: 1.1;
    word-break: keep-all;
}

.emblem-select-btn:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.emblem-select-btn.selected {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.emblem-select-btn.selected span {
    color: var(--success);
    font-weight: 700;
}

.emblem-select-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.recommender-results {
    animation: fadeIn 0.5s ease;
    border-top: 1px solid var(--border-glass);
    padding-top: 2rem;
}

.compatible-characters-section,
.recommended-comps-section {
    margin-bottom: 3rem;
}

.compatible-characters-section h3,
.recommended-comps-section h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-secondary);
    border-left: 4px solid var(--accent-secondary);
    padding-left: 1rem;
}

.compatible-characters-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Champion Gold Cost Borders */
.champ-cost-1 {
    border: 2px solid #94a3b8 !important;
    box-shadow: 0 0 6px rgba(148, 163, 184, 0.4) !important;
}
.champ-cost-2 {
    border: 2px solid #10b981 !important;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.4) !important;
}
.champ-cost-3 {
    border: 2px solid #3b82f6 !important;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.4) !important;
}
.champ-cost-4 {
    border: 2px solid #8b5cf6 !important;
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.4) !important;
}
.champ-cost-5 {
    border: 2px solid #f59e0b !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.5) !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .comp-card-top {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    
    .comp-card-info-group, .comp-stats {
        width: 100%;
        min-width: 0;
    }
    
    .core-units {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .top-bar-inner {
        flex-direction: column;
        gap: 0.8rem;
        padding: 0.8rem 1rem;
        align-items: center;
        text-align: center;
    }
    
    .tabs {
        width: 100%;
        justify-content: center;
        overflow-x: auto;
        padding: 0.2rem 0;
        -webkit-overflow-scrolling: touch;
        gap: 0.2rem;
    }
    
    .tab-btn {
        padding: 0.4rem 0.9rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    
    .header-stats {
        display: none; /* Hide header stats on small mobile screens */
    }

    .comps-grid {
        grid-template-columns: 1fr;
    }
}

/* Copy Code Button */
.copy-code-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    color: var(--text-muted);
    padding: 0.3rem 0.7rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
    margin-bottom: 0.5rem;
}

.copy-code-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: var(--accent-secondary);
    color: var(--text-main);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.2);
}

.copy-code-btn:active {
    transform: scale(0.95);
}

.copy-icon {
    transition: transform 0.2s ease;
}

.copy-code-btn:hover .copy-icon {
    transform: scale(1.1);
}

/* Clipboard Toast */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 9999;
    pointer-events: none;
}

.toast {
    background: rgba(10, 14, 23, 0.9);
    border: 1px solid var(--success);
    color: var(--text-main);
    padding: 0.8rem 1.5rem;
    border-radius: 0.8rem;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(16, 185, 129, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transform: translateY(20px);
    opacity: 0;
    animation: slideUp 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275), fadeOut 0.3s 2.5s forwards ease-in-out;
}

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

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* ==========================================
   Auth (Login / Logout) Styles
   ========================================== */
.auth-btn {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 1.2rem;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.outline-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.outline-btn:hover {
    border-color: var(--accent-secondary);
    background: rgba(139, 92, 246, 0.1);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(5, 7, 12, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-card {
    background: rgba(13, 18, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(139, 92, 246, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: relative;
    animation: modalSlideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal-btn {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.close-modal-btn:hover {
    color: var(--text-main);
}

.modal-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.modal-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
}

.modal-brand h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
}

/* Riot-Only Auth Styles */
.riot-auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.2rem;
    margin-top: 0.5rem;
}

.riot-auth-badge {
    width: 64px;
    height: 64px;
    background: rgba(240, 59, 71, 0.1);
    border: 1px solid rgba(240, 59, 71, 0.3);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 20px rgba(240, 59, 71, 0.2);
    margin-bottom: 0.2rem;
}

.riot-logo-large {
    width: 28px;
    height: 28px;
    background-color: #f03b47;
    clip-path: polygon(40% 0%, 40% 20%, 100% 20%, 100% 80%, 40% 80%, 40% 100%, 0% 50%);
    filter: drop-shadow(0 0 8px #f03b47);
}

.riot-auth-container h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
}

.riot-auth-description {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    max-width: 320px;
}

.riot-signin-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff4c57, #f03b47);
    color: #ffffff;
    border: none;
    border-radius: 0.8rem;
    padding: 1rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(240, 59, 71, 0.4);
    margin-top: 0.5rem;
}

.riot-signin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 59, 71, 0.6);
}

.riot-signin-btn:active {
    transform: translateY(0);
}

.riot-logo-icon {
    width: 16px;
    height: 16px;
    background-color: #ffffff;
    clip-path: polygon(40% 0%, 40% 20%, 100% 20%, 100% 80%, 40% 80%, 40% 100%, 0% 50%);
}

/* User Profile Badge & Dropdown */
.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.3rem 0.8rem 0.3rem 0.3rem;
    border-radius: 2rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    user-select: none;
}

.user-profile-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-secondary);
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

.user-avatar-wrapper {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.username-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.profile-dropdown-arrow {
    font-size: 0.6rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.user-profile-badge:hover .profile-dropdown-arrow {
    transform: rotate(180deg);
    color: var(--text-main);
}

.profile-dropdown-menu {
    position: absolute;
    top: 110%;
    right: 0;
    width: 220px;
    background: rgba(13, 18, 30, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1rem;
    padding: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(139, 92, 246, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    z-index: 1001;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.user-profile-badge:hover .profile-dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-header {
    padding: 0.6rem 0.8rem;
    display: flex;
    flex-direction: column;
    font-size: 0.75rem;
}

.dropdown-header strong {
    color: var(--text-main);
    font-size: 0.85rem;
    margin-bottom: 0.1rem;
}

.dropdown-header span {
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.3rem 0;
}

.dropdown-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 0.8rem;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    border-radius: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    transition: all 0.2s ease;
    width: 100%;
}

.dropdown-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.dropdown-item svg {
    color: var(--accent-secondary);
}

.logout-btn {
    color: var(--danger) !important;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

.logout-btn svg {
    color: var(--danger) !important;
}

/* Glassmorphic Toast Notification */
.auth-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(13, 18, 30, 0.9);
    border: 1px solid var(--accent-secondary);
    color: var(--text-main);
    padding: 0.8rem 1.5rem;
    border-radius: 0.8rem;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px rgba(139, 92, 246, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    z-index: 99999;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-toast svg {
    color: var(--accent-secondary);
}

.auth-toast.fade-out {
    animation: toastFadeOut 0.3s forwards ease-in-out;
}

@keyframes toastSlideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toastFadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}