/* ============================================
   Server Detail Page Styles
   ============================================ */

.server-page {
    padding: 48px 0 80px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.breadcrumb a {
    color: var(--text-muted);
    transition: color 0.2s var(--ease);
}

.breadcrumb a:hover { color: var(--accent); }

.breadcrumb svg { color: var(--text-faint); }

.breadcrumb-current { color: var(--text-primary); }

/* Hero section */
.server-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 48px;
    align-items: flex-start;
    padding: 40px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.server-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
    pointer-events: none;
}

@media (max-width: 900px) {
    .server-hero {
        grid-template-columns: 1fr;
        padding: 28px;
        gap: 28px;
    }
}

.hero-left { min-width: 0; position: relative; z-index: 1; }

.server-hero-top {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.hero-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--bg-elevated), var(--bg-secondary));
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    flex-shrink: 0;
    position: relative;
}

.hero-icon .server-status {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid var(--bg-card);
}

.hero-icon .server-status.online {
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
}

.hero-icon .server-status.offline { background: #6b7388; }

.hero-titles {
    min-width: 0;
}

.hero-name {
    font-family: var(--font-display);
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-motd {
    color: var(--text-secondary);
    font-size: 16px;
}

.hero-ip-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    max-width: 600px;
}

.ip-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.ip-value {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

.copy-ip {
    margin-left: auto;
    padding: 12px 18px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--border-accent);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s var(--ease);
    flex-shrink: 0;
}

.copy-ip:hover {
    background: var(--accent);
    color: #002211;
}

.copy-ip.copied {
    background: var(--accent);
    color: #002211;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.hero-tag {
    padding: 6px 14px;
    background: rgba(0, 255, 157, 0.08);
    border: 1px solid rgba(0, 255, 157, 0.2);
    color: var(--accent);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

.hero-meta {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.hero-meta-item .label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.hero-meta-item .value {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Vote box (right column) */
.vote-box {
    background: linear-gradient(135deg, rgba(0, 255, 157, 0.08), var(--bg-card));
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 28px;
    min-width: 280px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.vote-box-count {
    font-family: var(--font-display);
    font-size: 56px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -0.03em;
}

.vote-box-label {
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.vote-box-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dim));
    color: #002211;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.2s var(--ease);
    box-shadow: 0 4px 24px var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.vote-box-btn:hover { transform: translateY(-2px); }

.vote-box-info {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Tabs / content layout */
.server-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
}

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

.content-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}

.content-card h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
}

.content-card h3 svg {
    color: var(--accent);
}

.description-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 15px;
}

/* Edycja opisu — tylko dla właściciela */
.content-card h3 {
    position: relative;
}

.edit-desc-btn {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 183, 0, 0.08);
    border: 1px solid rgba(255, 183, 0, 0.3);
    color: #ffd700;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s var(--ease);
}

.edit-desc-btn:hover {
    background: rgba(255, 183, 0, 0.15);
    border-color: rgba(255, 183, 0, 0.5);
    transform: translateY(-1px);
}

.desc-source {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

.desc-textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s var(--ease);
}

.desc-textarea:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 4px rgba(255, 183, 0, 0.1);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 10px;
}

/* Stats chart */
.chart {
    height: 200px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 16px 0;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--accent), var(--accent-dim));
    border-radius: 6px 6px 0 0;
    opacity: 0.8;
    transition: all 0.3s var(--ease);
    position: relative;
    min-height: 4px;
}

.chart-bar:hover {
    opacity: 1;
    transform: scaleY(1.05);
    transform-origin: bottom;
}

.chart-bar .tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated);
    border: 1px solid var(--border-strong);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    white-space: nowrap;
    color: var(--text-primary);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    margin-bottom: 6px;
}

.chart-bar:hover .tooltip { opacity: 1; }

.chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
}

/* Comments */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment {
    display: flex;
    gap: 14px;
}

.comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--purple), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 17px;
    flex-shrink: 0;
}

.comment-body {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
}

.comment-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
}

.comment-date {
    font-size: 12px;
    color: var(--text-muted);
}

.comment-text {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.comment-form {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.comment-form textarea {
    width: 100%;
    min-height: 100px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s var(--ease);
}

.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.comment-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

/* Sidebar */
.sidebar { position: sticky; top: 100px; align-self: start; }

.sidebar-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
}

.sidebar-card h4 {
    font-family: var(--font-display);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.info-row:last-child { border-bottom: none; }

.info-row .label {
    color: var(--text-muted);
    font-size: 13px;
}

.info-row .value {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.info-row .value.online { color: var(--accent); }
.info-row .value.offline { color: #ff6b6b; }

.share-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.share-btn {
    aspect-ratio: 1;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s var(--ease);
}

.share-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    border-color: var(--border-accent);
    transform: translateY(-2px);
}

/* Not found */
.not-found {
    text-align: center;
    padding: 100px 20px;
}

.not-found-icon { font-size: 80px; margin-bottom: 20px; }
.not-found h2 { font-family: var(--font-display); font-size: 32px; margin-bottom: 12px; }
.not-found p { color: var(--text-muted); margin-bottom: 24px; }

/* ============================================
   Top Ad Banner (ZenCraft)
   Złoty sponsored banner u góry strony serwera
   ============================================ */
.top-ad-banner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 20px 24px;
    background:
        linear-gradient(135deg, rgba(255, 183, 0, 0.14) 0%, rgba(255, 100, 40, 0.06) 50%, rgba(20, 25, 40, 0.55) 100%);
    border: 1px solid rgba(255, 183, 0, 0.4);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 6px 30px rgba(255, 183, 0, 0.08);
    animation: ad-pulse 4s ease-in-out infinite;
}

@keyframes ad-pulse {
    0%, 100% { box-shadow: 0 6px 30px rgba(255, 183, 0, 0.08); }
    50% { box-shadow: 0 10px 50px rgba(255, 183, 0, 0.2); }
}

.top-ad-banner::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 183, 0, 0.18), transparent 60%);
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
}

.top-ad-banner::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 100, 40, 0.10), transparent 60%);
    pointer-events: none;
}

.top-ad-banner:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 183, 0, 0.7);
    background:
        linear-gradient(135deg, rgba(255, 183, 0, 0.20) 0%, rgba(255, 100, 40, 0.10) 50%, rgba(30, 38, 60, 0.65) 100%);
}

.top-ad-banner:hover::before { opacity: 1.3; }

.top-ad-label {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.4);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 600;
    z-index: 2;
    pointer-events: none;
}

.top-ad-image {
    width: 110px;
    height: 110px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    background:
        linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 140, 40, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 183, 0, 0.35);
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 20px rgba(255, 140, 0, 0.15);
}

.top-ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.top-ad-fallback {
    display: none;
    font-size: 58px;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.top-ad-content {
    min-width: 0;
    position: relative;
    z-index: 1;
    padding-right: 70px; /* odsuń od "Reklama" labela */
}

.top-ad-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #ffd700 0%, #ff9500 100%);
    color: #2a1a00;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(255, 183, 0, 0.3);
}

.top-ad-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    letter-spacing: -0.015em;
    line-height: 1.1;
}

.top-ad-desc {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    max-width: 600px;
}

.top-ad-cta {
    padding: 14px 22px;
    background: linear-gradient(135deg, #ffd700 0%, #ff9500 100%);
    color: #2a1a00;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    box-shadow:
        0 4px 24px rgba(255, 183, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
}

.top-ad-banner:hover .top-ad-cta {
    transform: translateY(-1px);
    box-shadow:
        0 6px 32px rgba(255, 183, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.top-ad-cta svg {
    transition: transform 0.2s var(--ease);
}

.top-ad-banner:hover .top-ad-cta svg {
    transform: translate(2px, -2px);
}

@media (max-width: 800px) {
    .top-ad-banner {
        grid-template-columns: 80px 1fr;
        gap: 16px;
        padding: 16px;
    }
    .top-ad-image { width: 80px; height: 80px; }
    .top-ad-fallback { font-size: 42px; }
    .top-ad-title { font-size: 20px; }
    .top-ad-desc { font-size: 13px; }
    .top-ad-cta {
        grid-column: 1 / -1;
        justify-content: center;
        padding: 12px 18px;
        font-size: 13px;
    }
    .top-ad-content {
        padding-right: 0;
    }
    .top-ad-label {
        top: 8px;
        right: 8px;
        font-size: 8px;
    }
}

@media (max-width: 500px) {
    .top-ad-banner {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .top-ad-image { margin: 0 auto; }
    .top-ad-badge { margin-left: auto; margin-right: auto; }
}
