html { overflow-y: scroll; }

body {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-areas:
        "header header header"
        "left content right"
        "footer footer footer";
    grid-template-columns: 160px 1fr 160px;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    background: #0d0f12;
    color: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

header { grid-area: header; }
.ad-left { grid-area: left; }
.ad-right { grid-area: right; }

main { 
    grid-area: content; 
    padding: 32px 20px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 20px; 
}

footer { grid-area: footer; padding: 24px; text-align: center; font-size: 12px; color: #4e5d78; }

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #141822;
    padding: 15px 25px;
    border-bottom: 1px solid #1f293d;
    position: relative;
    z-index: 1000;
}

.logo-link { text-decoration: none; display: inline-block; cursor: pointer; }
.logo { color: #00BFFF; font-size: 24px; font-weight: 700; letter-spacing: 1px; transition: opacity 0.2s; }
.logo span { color: #fff; }
.logo:hover { opacity: 0.8; }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dropdown-toggle, .nav-item {
    color: #9ab0c7;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.2s;
    text-decoration: none;
}
.dropdown-toggle:hover, .nav-item:hover { color: #00BFFF; }

.dropdown { position: relative; display: inline-block; }
.dropdown-content {
    display: none; 
    position: absolute; 
    background-color: #141822; 
    width: 250px; 
    box-shadow: 0px 8px 16px rgba(0,0,0,0.5); 
    z-index: 1000; 
    max-height: 400px; 
    overflow-y: auto; 
    left: 50%; 
    transform: translateX(-50%); 
    border: 1px solid #1f293d;
    border-radius: 4px;
}
.dropdown-content a { color: #f5f7fa; padding: 10px 14px; text-decoration: none; display: block; text-align: left; font-size: 13px; }
.dropdown-content a:hover { background-color: #1f293d; color: #00BFFF; }
.dropdown-content.active { display: block !important; }

@media (min-width: 769px) {
    .dropdown:hover .dropdown-content { display: block; }
}

.donate-btn {
    width: 100%;
    box-sizing: border-box;
    color: #0d0f12;
    background: #00BFFF;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #141822;
        border-bottom: 1px solid #1f293d;
        padding: 15px;
        box-sizing: border-box;
        gap: 5px;
        align-items: flex-start;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    .nav-menu.open { display: flex; }
    .dropdown { width: 100%; }
    .dropdown-content {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 15px;
        background: rgba(255,255,255,0.02);
        width: 100%;
        max-height: none;
    }
    .dropdown-content a { padding: 8px 10px; }
    .dropdown-toggle, .nav-item { width: 100%; text-align: left; padding: 10px 0; font-size: 14px; }
    .donate-btn { width: 100%; justify-content: center; margin-top: 5px; padding: 10px; font-size: 13px; }
    
    body { grid-template-columns: 1fr; grid-template-areas: "header" "content" "footer"; }
    .ad-left, .ad-right { display: none; }
    .build-item-cols { flex-direction: column; gap: 10px; }
}

/* KARTY I ELEMENTY BUILDÓW */
.card { 
    width: 100%; 
    max-width: 600px; 
    background: #141822; 
    border: 1px solid #1f293d; 
    border-radius: 10px; 
    padding: 24px; 
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45); 
    text-align: center;
    box-sizing: border-box;
}
.card h1 { margin: 0 0 8px 0; color: #00BFFF; font-size: 26px; }
.card p { margin: 0; color: #9ab0c7; font-size: 14px; }

.build-item { 
    background: #141822; 
    border: 1px solid #1f293d; 
    border-radius: 8px; 
    padding: 20px; 
    width: 100%;
    max-width: 600px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
}

.build-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1f293d;
    padding-bottom: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}
.build-item-header h3 { margin: 0; color: #00BFFF; font-size: 18px; }
.build-item-meta { font-size: 13px; color: #9ab0c7; }

.build-item-cols {
    display: flex;
    gap: 12px;
    text-align: left;
}

.build-col {
    flex: 1;
    min-width: 0;
    background: #1f293d;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #30363d;
}
.build-col h4 {
    margin: 0 0 6px 0;
    color: #00BFFF;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #30363d;
    padding-bottom: 4px;
}
.build-col p {
    margin: 0;
    font-size: 12px;
    color: #e0e6ed;
    line-height: 1.4;
}

.col-content { display: flex; flex-direction: column; gap: 4px; }
.data-row { background: #181d28; border: 1px solid #2a3441; border-radius: 4px; padding: 4px 8px; }
.row-main { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px; }
.name { font-size: 13px; color: #e0e6ed; flex-grow: 1; }
.freq { font-size: 11px; color: #00BFFF; background: rgba(0, 191, 255, 0.1); padding: 2px 5px; border-radius: 3px; font-weight: bold; }
.btn-expand { background: transparent; color: #9ab0c7; border: 1px solid #30363d; border-radius: 3px; cursor: pointer; font-size: 10px; padding: 2px 6px; transition: all 0.2s; }
.btn-expand:hover { background: #00BFFF; color: #0d0f12; border-color: #00BFFF; }
.desc-box { display: none; width: 100%; font-size: 11px; color: #8b9eb5; padding: 6px 0 2px 0; margin-top: 4px; border-top: 1px dashed #30363d; }
.unique-link { color: #af6025; text-decoration: none; font-weight: bold; font-size: 13px; flex-grow: 1; }
.unique-link:hover { text-decoration: underline; color: #d1752f; }

.skill-tooltip {
    position: absolute;
    background: #11151c;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 12px;
    width: 300px;
    color: #e0e6ed;
    font-size: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    flex-direction: column;
    line-height: 1.4;
}

.skill-tooltip.active { display: flex; }
.skill-hover { cursor: pointer; border-bottom: 1px dotted #666; transition: color 0.2s, border-color 0.2s; }
.skill-hover:hover { color: #00BFFF !important; border-bottom: 1px dotted #00BFFF; }

/* ==========================================================================
   REKLAMY BOCZNE (Pływające podczas scrollowania na PC)
   ========================================================================== */
.ad-left, .ad-right {
    position: sticky;
    top: 85px; /* Odstęp od górnego menu */
    height: max-content; 
    z-index: 10;
}