/* ========== RESET & BASE STYLES ========== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap');

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    background-image:
        radial-gradient(at 20% 30%, rgba(244, 197, 66, 0.05) 0px, transparent 50%),
        radial-gradient(at 80% 70%, rgba(255, 128, 0, 0.05) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(163, 53, 238, 0.03) 0px, transparent 50%);
    color: #fff;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.01) 0px, transparent 1px, transparent 40px),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.01) 0px, transparent 1px, transparent 40px);
    pointer-events: none;
    z-index: 1;
}

/* ========== HEADER & NAVIGATION ========== */
.header {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(244, 197, 66, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 12px rgba(244, 197, 66, 0.4));
    transition: all 0.3s ease;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-icon:hover {
    transform: rotate(180deg) scale(1.1);
    filter: drop-shadow(0 6px 20px rgba(244, 197, 66, 0.8));
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.nav-links a:hover {
    background: #2a2a2a;
}

.nav-links .btn-primary {
    background: #f4c542;
    color: #000;
    font-weight: 600;
}

.nav-links .btn-primary:hover {
    background: #e6a615;
}

.nav-links .login-btn {
    border: 1px solid #3a3a3a;
}

/* ========== HERO SECTION ========== */
.hero {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
}

.patch-info {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: #1a1a1a;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.patch-info span {
    color: #888;
}

.patch-info strong {
    color: #fff;
}

.hero-title {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.hero-title .icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 8px 20px rgba(244, 197, 66, 0.5));
    transition: all 0.3s ease;
}

.hero-title .icon svg {
    width: 100%;
    height: 100%;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.hero-title:hover .icon {
    filter: drop-shadow(0 12px 30px rgba(244, 197, 66, 0.8));
    transform: scale(1.1);
}

.hero-title h1 {
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 4px;
    background: linear-gradient(135deg, #fff 0%, #f4c542 50%, #ff8000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(244, 197, 66, 0.3);
    position: relative;
}

.hero-title .comps {
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-weight: 800;
}

.hero-title .arrow {
    color: #f4c542;
    -webkit-text-fill-color: #f4c542;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-title .tierlist {
    background: linear-gradient(135deg, #f4c542 0%, #ff8000 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    text-shadow: 0 0 30px rgba(244, 197, 66, 0.5);
}

/* ========== TABS ========== */
.tabs {
    display: flex;
    gap: 2rem;
    border-bottom: 2px solid #2a2a2a;
    margin-bottom: 2rem;
}

.tab {
    padding: 1rem 0;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
}

.tab.active {
    color: #f4c542;
    border-bottom-color: #f4c542;
}

/* ========== CONTROLS ========== */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.search-box {
    background: rgba(26, 26, 26, 0.8);
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    color: #fff;
    width: 300px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.search-box:focus {
    outline: none;
    border-color: #f4c542;
    box-shadow: 0 0 20px rgba(244, 197, 66, 0.2);
    background: rgba(26, 26, 26, 0.95);
}

.search-box::placeholder {
    color: #666;
}

.comp-style-btn {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(30, 30, 30, 0.9));
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    padding: 0.8rem 1.2rem;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.comp-style-btn:hover {
    border-color: #f4c542;
    background: linear-gradient(135deg, rgba(244, 197, 66, 0.1), rgba(255, 128, 0, 0.1));
    box-shadow: 0 4px 15px rgba(244, 197, 66, 0.2);
    transform: translateY(-2px);
}

/* ========== CONTENT AREA ========== */
.content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    position: relative;
    z-index: 2;
}

.hero {
    position: relative;
    z-index: 2;
}

.tier-section {
    margin-bottom: 2rem;
}

.tier-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}

/* ========== TIER BADGES ========== */
.tier-badge {
    width: 140px;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    font-weight: 900;
    font-size: 4rem;
    position: relative;
    flex-shrink: 0;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        inset 0 0 0 3px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

.tier-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
}

.tier-badge::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 12px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    clip-path: polygon(0 0, 0 100%, 100% 0);
}

.tier-badge:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.6),
        inset 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.tier-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.5rem;
    opacity: 0.9;
}

.tier-s {
    background: linear-gradient(135deg, #ff3860, #ff5252);
    color: #1a0a0a;
}

.tier-a {
    background: linear-gradient(135deg, #ff8c42, #ffa552);
    color: #1a0a0a;
}

.tier-b {
    background: linear-gradient(135deg, #ffe259, #ffd659);
    color: #1a0a0a;
}

.tier-c {
    background: linear-gradient(135deg, #5efc82, #57e074);
    color: #0a1a0a;
}

.tier-d {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: #0a0a1a;
}

/* ========== CHAMPIONS CONTAINER ========== */
.champions-container {
    flex: 1;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.8), rgba(20, 20, 20, 0.9));
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    border: 2px solid;
    min-height: 100px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.champions-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.3;
}

.tier-s + .champions-container {
    border-color: #ff4757;
}

.tier-a + .champions-container {
    border-color: #ffa502;
}

.tier-b + .champions-container {
    border-color: #ffd700;
}

.tier-c + .champions-container {
    border-color: #7bed9f;
}

.tier-d + .champions-container {
    border-color: #70a1ff;
}

/* ========== CHAMPION ICONS ========== */
.champion-icon {
    width: 80px;
    height: 80px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0.95);
}

.champion-icon:hover {
    transform: scale(1.15) translateY(-4px);
    filter: brightness(1.1) drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4));
    z-index: 10;
}

.champion-icon::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: inherit;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.champion-icon:hover::before {
    opacity: 1;
}

.champion-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.cost-badge {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: #fff;
    min-width: 28px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

/* Cost-specific colors with glow */
.cost-1 .cost-badge {
    border-color: #808080;
    color: #808080;
    text-shadow: 0 0 6px rgba(128, 128, 128, 0.6);
}
.cost-2 .cost-badge {
    border-color: #1eff00;
    color: #1eff00;
    text-shadow: 0 0 6px rgba(30, 255, 0, 0.6);
}
.cost-3 .cost-badge {
    border-color: #0070dd;
    color: #0070dd;
    text-shadow: 0 0 6px rgba(0, 112, 221, 0.6);
}
.cost-4 .cost-badge {
    border-color: #a335ee;
    color: #a335ee;
    text-shadow: 0 0 6px rgba(163, 53, 238, 0.6);
}
.cost-5 .cost-badge {
    border-color: #ff8000;
    color: #ff8000;
    text-shadow: 0 0 6px rgba(255, 128, 0, 0.6);
}

/* Hexagon border glow on hover */
.cost-1:hover { filter: drop-shadow(0 0 12px #808080); }
.cost-2:hover { filter: drop-shadow(0 0 12px #1eff00); }
.cost-3:hover { filter: drop-shadow(0 0 12px #0070dd); }
.cost-4:hover { filter: drop-shadow(0 0 12px #a335ee); }
.cost-5:hover { filter: drop-shadow(0 0 12px #ff8000); }

/* ========== MODAL ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 2rem;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1a1a1a;
    border-radius: 16px;
    max-width: 1200px;
    width: 100%;
    padding: 2rem;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f4c542;
    color: #000;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.5rem;
    cursor: pointer;
    font-weight: 700;
}

.modal-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.modal-champion-large {
    width: 150px;
    height: 150px;
    border-radius: 16px;
    overflow: hidden;
    border: 4px solid #f4c542;
}

.modal-champion-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-info .playstyle {
    color: #f4c542;
    font-weight: 600;
    margin-bottom: 1rem;
}

.traits-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.trait-badge {
    background: #2a2a2a;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.comp-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.detail-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #f4c542;
}

/* ========== FOOTER ========== */
.footer {
    background: #1a1a1a;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid #2a2a2a;
    margin-top: 4rem;
}

.footer p {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ========== BADGES ========== */
.situational-badge {
    display: inline-block;
    background: #00d9ff;
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
