:root {
    --bg-main: #0a0e17;
    --bg-card: #151a25;
    --bg-card-hover: #1e2532;
    --text-primary: #f0f6fc;
    --text-secondary: #8b949e;
    --accent: #c89b3c;
    --accent-hover: #e0b450;
    --ally-color: #005a82;
    --enemy-color: #9e1b1b;
    --success: #238636;
    --warning: #d29922;
    --danger: #da3633;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Header */
.hero {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(180deg, #101520 0%, var(--bg-main) 100%);
    border-bottom: 1px solid #1e2532;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.header-note {
    margin-top: 1rem;
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(210, 153, 34, 0.1);
    border: 1px solid rgba(210, 153, 34, 0.3);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--warning);
}

/* Layout */
.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

/* Teams Area */
.teams-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 2rem;
    position: relative;
}

.vs-divider {
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.5;
}

.team {
    flex: 1;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.05);
}

.ally-team h2 { color: #58a6ff; text-align: center; margin-bottom: 1.5rem; }
.enemy-team h2 { color: #ff7b72; text-align: center; margin-bottom: 1.5rem; }

.roles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.role-slot {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    padding: 0.75rem;
    transition: background 0.2s;
    position: relative;
}

.role-slot.highlight-jungle {
    border: 1px solid rgba(200, 155, 60, 0.3);
    background: rgba(200, 155, 60, 0.05);
}

.role-slot:hover {
    background: rgba(255,255,255,0.05);
}

.role-icon {
    width: 60px;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
}

.champ-selector {
    flex: 1;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: var(--bg-card-hover);
    border-radius: 4px;
    border: 1px dashed var(--text-secondary);
    text-align: center;
    transition: all 0.2s;
}

.champ-selector:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.champ-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-left: 1rem;
    border: 2px solid transparent;
    cursor: pointer;
    object-fit: cover;
}

.ally-team .champ-img { border-color: var(--ally-color); }
.enemy-team .champ-img { border-color: var(--enemy-color); }

.hidden { display: none !important; }

.clear-champ {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    z-index: 10;
}

.clear-champ:hover {
    background: #ff4444;
}

.flash-toggle {
    margin-left: 1rem;
    cursor: pointer;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all 0.2s;
}

.flash-toggle:has(input:checked) {
    filter: grayscale(0%);
    opacity: 1;
}

.flash-toggle input {
    display: none;
}

/* Results */
.results-container {
    max-width: 800px;
    margin: 2rem auto;
}

.gank-priority-panel, .jungle-synergy-panel {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.results-container h2 {
    text-align: center;
    color: var(--accent);
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

.placeholder-text {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* Advanced Combat Cards */
.combat-card {
    background: rgba(0,0,0,0.3);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.combat-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 1rem;
}

.combat-card-header h3 {
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bot-synergy-tag {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(88, 166, 255, 0.2);
    color: #58a6ff;
}

.stat-row {
    margin-bottom: 1rem;
}

.stat-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.stat-bar-bg {
    height: 8px;
    background: rgba(0,0,0,0.5);
    border-radius: 4px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-out, background 0.5s;
    width: 0%;
}

.score-elite { background-color: #3498db; box-shadow: 0 0 8px rgba(52, 152, 219, 0.5); } /* Blue */
.score-great { background-color: #2ecc71; box-shadow: 0 0 8px rgba(46, 204, 113, 0.5); } /* Green */
.score-good { background-color: #f1c40f; box-shadow: 0 0 8px rgba(241, 196, 15, 0.5); } /* Yellow */
.score-avg { background-color: #e67e22; box-shadow: 0 0 8px rgba(230, 126, 34, 0.5); } /* Orange */
.score-bad { background-color: #e74c3c; box-shadow: 0 0 8px rgba(231, 76, 60, 0.5); } /* Red */

.warning-box {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(218, 54, 51, 0.1);
    border: 1px solid rgba(218, 54, 51, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #ff7b72;
}

/* Jungle Synergy */
.synergy-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.synergy-item img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 1rem;
    border: 2px solid var(--accent);
}

.synergy-info {
    flex: 1;
}

.synergy-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
}

.synergy-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.synergy-score {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-card);
    width: 90%;
    max-width: 600px;
    height: 80vh;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.enemy-mechanics {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.mechanics-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.close-modal {
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

.close-modal:hover { color: white; }

#champ-search {
    margin: 1.5rem;
    padding: 1rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
}

#champ-search:focus {
    outline: none;
    border-color: var(--accent);
}

.champ-list {
    padding: 0 1.5rem 1.5rem 1.5rem;
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
}

.champ-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.champ-item:hover {
    transform: translateY(-5px);
}

.champ-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.champ-item span {
    font-size: 0.8rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Footer Disclaimer */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.site-footer p {
    color: rgba(139, 148, 158, 0.6);
    font-size: 0.75rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.4;
}

/* Donation / Monetization */
.donation-container {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.donation-container p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.coffee-btn {
    display: inline-block;
    background-color: #FFDD00;
    color: #000000;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(255, 221, 0, 0.3);
}

.coffee-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 221, 0, 0.5);
}

/* Ranked Mode Toggle */
.settings-bar {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.toggle-ranked {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
}

.toggle-ranked:hover {
    background: rgba(255,255,255,0.05);
}

.toggle-ranked input[type="checkbox"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Disabled Champions */
.champ-item.disabled-champ {
    opacity: 0.3;
    pointer-events: none;
    filter: grayscale(100%);
}

.champ-item.disabled-champ:hover {
    background: transparent;
}
@media (max-width: 900px) {
    .teams-container {
        flex-direction: column;
    }
    .vs-divider {
        padding: 1rem 0;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .teams-container { gap: 1rem; }
    .role-slot { padding: 0.5rem; }
    .role-icon { width: 50px; font-size: 0.8rem; }
    .champ-selector { padding: 0.5rem; font-size: 0.9rem; }
    .modal-content { width: 95%; margin: 5% auto; padding: 1rem; }
    .modal-header { padding: 1rem; }
    #champ-search { padding: 0.8rem; margin: 0 1rem 1rem; width: calc(100% - 2rem); }
    .combat-card { padding: 1.2rem; }
}
