/* Base Variables */
:root {
    --bg-dark: #060913;
    --bg-card: rgba(14, 21, 37, 0.6);
    --bg-hover: rgba(26, 38, 66, 0.8);
    --border-color: rgba(197, 160, 89, 0.2);
    --border-hover: rgba(197, 160, 89, 0.6);
    
    --gold: #c5a059;
    --gold-bright: #f0e6d2;
    --gold-dark: #785a28;
    
    --text-main: #f0e6d2;
    --text-muted: #a0a5b5;
    
    --red: #ff4e50;
    --green: #2ecc71;
    
    --font-primary: 'Outfit', sans-serif;
    --transition-speed: 0.3s;
}

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

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

/* Ambient Background Video / Effect */
.video-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at center, #101c3d 0%, #03060f 100%);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.8));
}

/* Header */
header {
    text-align: center;
    padding: 40px 20px 20px;
}

.logo {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.gold-glow {
    color: var(--gold);
    text-shadow: 0 0 15px rgba(197, 160, 89, 0.6);
}

.gold-text {
    color: var(--gold);
    text-shadow: 0 0 5px rgba(197, 160, 89, 0.3);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: 8px;
    font-weight: 300;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
    flex: 1;
}

/* Search and Filters */
.search-filter-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.search-bar-wrapper {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 1.2rem;
}

#championSearch {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    background: rgba(14, 21, 37, 0.8);
    color: var(--text-main);
    font-size: 1.1rem;
    font-family: var(--font-primary);
    outline: none;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#championSearch:focus {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4), 0 10px 30px rgba(0, 0, 0, 0.5);
    background: rgba(20, 30, 54, 0.9);
}

.role-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.role-btn {
    background: rgba(14, 21, 37, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-speed) ease;
}

.role-btn:hover {
    color: var(--gold-bright);
    border-color: var(--border-hover);
    background: var(--bg-hover);
}

.role-btn.active {
    color: var(--bg-dark);
    background: var(--gold);
    border-color: var(--gold);
    font-weight: 600;
    box-shadow: 0 0 15px rgba(197, 160, 89, 0.4);
}

.role-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: brightness(0.8) invert(1);
    transition: filter var(--transition-speed) ease;
}

.role-btn:hover .role-icon-img {
    filter: brightness(1.2) sepia(1) saturate(5) hue-rotate(15deg);
}

.role-btn.active .role-icon-img {
    filter: brightness(0.1) contrast(1.5);
}

/* App Grid */
.app-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    gap: 25px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .app-grid {
        grid-template-columns: 1fr;
    }
}

/* Left Column: Champion List */
.champion-list-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 600px;
}

.champion-list-wrapper h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold-bright);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.champion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar Styling */
.champion-grid::-webkit-scrollbar,
.tips-list::-webkit-scrollbar {
    width: 6px;
}

.champion-grid::-webkit-scrollbar-track,
.tips-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.champion-grid::-webkit-scrollbar-thumb,
.tips-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.champion-grid::-webkit-scrollbar-thumb:hover,
.tips-list::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* Champion Card */
.champion-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    padding: 8px;
    border-radius: 10px;
    position: relative;
}

.champion-card:hover {
    background: var(--bg-hover);
    transform: translateY(-3px);
}

.champion-card.active {
    background: rgba(197, 160, 89, 0.15);
    border: 1px solid var(--gold);
}

.img-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: border-color var(--transition-speed);
}

.champion-card:hover .img-container,
.champion-card.active .img-container {
    border-color: var(--gold);
}

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

.champ-name {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-main);
    word-break: break-word;
}

/* Right Column: Details & Counters */
.details-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 30px;
    min-height: 400px;
    position: relative;
    backdrop-filter: blur(10px);
}

.placeholder-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    gap: 15px;
    color: var(--text-muted);
}

.info-icon {
    font-size: 3rem;
    color: var(--gold);
    opacity: 0.5;
}

.hidden {
    display: none !important;
}

/* Active Details Page */
.active-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
    animation: fadeIn 0.4s ease-out;
}

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

.details-header {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.details-champ-img-container {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid var(--gold);
}

.details-champ-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.details-champ-meta h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold-bright);
    line-height: 1.1;
}

.details-champ-meta p {
    color: var(--gold);
    font-weight: 400;
    font-size: 1rem;
    margin-bottom: 8px;
}

.detail-tags {
    display: flex;
    gap: 5px;
}

.role-tag {
    background: rgba(197, 160, 89, 0.1);
    color: var(--gold);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    font-size: 0.75rem;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Counters Columns */
.counter-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.counter-column {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(255,255,255,0.03);
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.red-icon { color: var(--red); }
.green-icon { color: var(--green); }

.counter-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.counter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.counter-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
}

.counter-item-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.counter-item-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

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

.win-rate {
    font-size: 0.85rem;
    font-weight: bold;
}

.win-rate.win { color: var(--green); }
.win-rate.loss { color: var(--red); }

/* Tips Section */
.tips-section {
    background: rgba(197, 160, 89, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
}

.tips-section h4 {
    color: var(--gold-bright);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tips-list li {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-muted);
    padding-left: 20px;
    position: relative;
}

.tips-list li::before {
    content: "➔";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--gold);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: rgba(240, 230, 210, 0.3);
    font-size: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.02);
    margin-top: auto;
}

/* Custom Matchup Selection Styles */
.custom-matchup-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
}

.section-main-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold-bright);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.matchup-selector-wrapper {
    display: grid;
    grid-template-columns: 2fr auto 2fr 1.5fr 1fr;
    align-items: flex-end;
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .matchup-selector-wrapper {
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: stretch;
    }
    .swap-btn {
        margin: 10px auto;
        transform: rotate(90deg);
    }
    .swap-btn:hover {
        transform: rotate(270deg);
    }
}

.selector-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.selector-box label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.matchup-dropdown {
    background: rgba(14, 21, 37, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 15px;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
    transition: border-color var(--transition-speed);
}

.matchup-dropdown:focus {
    border-color: var(--gold);
}

.swap-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--gold);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition-speed);
    margin-bottom: 2px; /* to align with dropdowns */
}

.swap-btn:hover {
    background: rgba(197, 160, 89, 0.1);
    border-color: var(--gold);
    transform: rotate(180deg);
}

.analyze-btn {
    background: var(--gold);
    color: var(--bg-dark);
    font-weight: bold;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-primary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.3);
}

.analyze-btn:hover {
    background: var(--gold-bright);
    box-shadow: 0 4px 20px rgba(197, 160, 89, 0.5);
    transform: translateY(-2px);
}

/* Matchup Result Box */
.matchup-result-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(197, 160, 89, 0.15);
    padding: 25px;
    margin-top: 20px;
    animation: fadeIn 0.4s ease-out;
}

.matchup-result-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 20px;
}

.champ-mini-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100px;
}

.champ-mini-card img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.champ-mini-card span {
    font-size: 0.95rem;
    font-weight: 600;
}

.champ-label {
    font-size: 0.75rem !important;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 800 !important;
    text-transform: uppercase;
}

.blue-lbl {
    background: rgba(46, 204, 113, 0.15);
    color: var(--green);
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.red-lbl {
    background: rgba(255, 78, 80, 0.15);
    color: var(--red);
    border: 1px solid rgba(255, 78, 80, 0.3);
}

.vs-badge {
    background: rgba(197, 160, 89, 0.1);
    border: 1px solid var(--border-color);
    color: var(--gold);
    font-weight: 800;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.matchup-verdict {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.matchup-strategy-tips {
    background: rgba(197, 160, 89, 0.02);
    border-top: 1px dashed rgba(197, 160, 89, 0.15);
    padding-top: 15px;
}

.matchup-strategy-tips h4 {
    margin-bottom: 12px;
}

/* Build & Counter Items Styles */
.build-section, .counter-items-section {
    margin-top: 25px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.build-section h4, .counter-items-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
}

.build-items-list, .counter-items-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.item-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 70px;
    transition: transform var(--transition-speed);
}

.item-card:hover {
    transform: translateY(-2px);
}

.item-img-container {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.item-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-name {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

