/* ============================================
   World Clickers Wiki — Shared Stylesheet
   ============================================ */

/* --- CSS Variables --- */
:root {
    --wiki-gold: #ffd700;
    --wiki-gold-dim: rgba(255, 215, 0, 0.2);
    --wiki-gold-glow: rgba(255, 215, 0, 0.15);
    --wiki-text: rgba(255, 255, 255, 0.9);
    --wiki-text-dim: rgba(255, 255, 255, 0.55);
    --wiki-card-bg: rgba(255, 255, 255, 0.04);
    --wiki-card-border: rgba(255, 255, 255, 0.08);
    --wiki-card-hover: rgba(255, 255, 255, 0.08);
    --wiki-radius: 12px;
    --wiki-max-width: calc(1100px * var(--s));
}

/* --- Page Layout --- */
.wiki-body {
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

.wiki-container {
    max-width: var(--wiki-max-width);
    margin: 0 auto;
    padding: calc(40px * var(--s)) calc(30px * var(--s));
    padding-bottom: calc(80px * var(--s));
}

/* --- Header / Navigation --- */
.wiki-header {
    text-align: center;
    margin-bottom: calc(50px * var(--s));
}

.wiki-header-logo {
    width: calc(200px * var(--s));
    height: auto;
    margin-bottom: calc(30px * var(--s));
    filter: drop-shadow(0 calc(4px * var(--s)) calc(12px * var(--s)) rgba(0, 0, 0, 0.5));
}

.wiki-title {
    font-family: 'Lilita One', cursive;
    font-size: calc(48px * var(--s));
    color: var(--wiki-gold);
    margin: 0 0 calc(5px * var(--s));
    text-shadow: 0 calc(2px * var(--s)) calc(10px * var(--s)) rgba(255, 215, 0, 0.3);
}

.wiki-subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: calc(32px * var(--s));
    color: var(--wiki-text-dim);
    margin: 0 0 calc(25px * var(--s));
}

.wiki-page-title {
    font-family: 'Lilita One', cursive;
    font-size: calc(40px * var(--s));
    color: var(--wiki-gold);
    margin: 0 0 calc(8px * var(--s));
    text-shadow: 0 calc(2px * var(--s)) calc(10px * var(--s)) rgba(255, 215, 0, 0.3);
}

/* --- Breadcrumb --- */
.wiki-breadcrumb {
    font-family: 'Roboto', sans-serif;
    font-size: calc(26px * var(--s));
    color: var(--wiki-text-dim);
    margin-bottom: calc(30px * var(--s));
    text-align: center;
}

.wiki-breadcrumb a {
    color: var(--wiki-gold);
    text-decoration: none;
}

.wiki-breadcrumb a:hover {
    text-decoration: underline;
}

.wiki-breadcrumb span {
    margin: 0 calc(6px * var(--s));
}

/* --- Section Headers --- */
.wiki-section {
    margin-bottom: calc(50px * var(--s));
}

.wiki-section-title {
    font-family: 'Lilita One', cursive;
    font-size: calc(44px * var(--s));
    color: var(--wiki-gold);
    margin: 0 0 calc(6px * var(--s));
    padding-bottom: calc(30px * var(--s));
    border-bottom: calc(1px * var(--s)) solid rgba(255, 215, 0, 0.15);
}

.wiki-section-desc {
    font-family: 'Roboto', sans-serif;
    font-size: calc(30px * var(--s));
    color: var(--wiki-text-dim);
    margin: calc(8px * var(--s)) 0 calc(20px * var(--s));
    line-height: 1.5;
}

/* --- Planet Hub Cards (index page) --- */
.wiki-hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(20px * var(--s));
}

@media (max-width: 768px) {
    .wiki-hub-grid {
        grid-template-columns: 1fr;
    }
}

.wiki-hub-card {
    background: var(--wiki-card-bg);
    border: calc(1px * var(--s)) solid var(--wiki-card-border);
    border-radius: calc(30px * var(--s));
    padding: calc(30px * var(--s));
    text-align: center;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(10px * var(--s));
}

.wiki-hub-card:hover {
    background: var(--wiki-gold-dim);
    border-color: var(--wiki-gold);
    transform: translateY(calc(-3px * var(--s)));
}

.wiki-hub-card i {
    font-size: calc(36px * var(--s));
    color: var(--wiki-gold);
}

.wiki-hub-card-title {
    font-family: 'Lilita One', cursive;
    font-size: calc(30px * var(--s));
    color: #fff;
    margin-top: calc(14px * var(--s));
}

.wiki-hub-card-desc {
    font-family: 'Roboto', sans-serif;
    font-size: calc(24px * var(--s));
    color: var(--wiki-text-dim);
    line-height: 1.4;
}

.wiki-hub-card-count {
    font-family: 'Roboto', sans-serif;
    font-size: calc(26px * var(--s));
    color: var(--wiki-gold);
    font-weight: 700;
}

/* --- Planet Thumbnail with border overlay --- */
.wiki-planet-thumb-wrap {
    position: relative;
    width: calc(180px * var(--s));
    height: calc(180px * var(--s));
    flex-shrink: 0;
}

.wiki-planet-thumb-wrap img.wiki-planet-thumb {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.wiki-planet-thumb-wrap .wiki-planet-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../space/circular_shading.png');
    opacity: 0.5;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
    border-radius: 50%;
}

/* --- Planet Header Banner --- */
.wiki-planet-banner {
    background: var(--wiki-card-bg);
    border: calc(1px * var(--s)) solid var(--wiki-card-border);
    border-radius: calc(30px * var(--s));
    padding: calc(35px * var(--s));
    margin-bottom: calc(40px * var(--s));
    display: flex;
    gap: calc(30px * var(--s));
    align-items: flex-start;
}

.wiki-planet-banner .wiki-planet-thumb-wrap {
    width: calc(280px * var(--s));
    height: calc(280px * var(--s));
}

@media (max-width: 768px) {
.wiki-planet-banner .wiki-planet-thumb-wrap {
    width: calc(140px * var(--s));
     height: calc(140px * var(--s));
}
}

.wiki-planet-banner-info {
    flex: 1;
}

.wiki-planet-banner-name {
    font-family: 'Lilita One', cursive;
    font-size: calc(36px * var(--s));
    color: var(--wiki-gold);
    margin: 0 0 calc(10px * var(--s));
    text-shadow: 0 calc(2px * var(--s)) calc(8px * var(--s)) rgba(255, 215, 0, 0.2);
}

.wiki-planet-banner-text {
    font-family: 'Roboto', sans-serif;
    font-size: calc(30px * var(--s));
    color: var(--wiki-text);
    line-height: 1.7;
    margin-bottom: calc(12px * var(--s));
}

.wiki-planet-banner-stats {
    display: flex;
    gap: calc(20px * var(--s));
    flex-wrap: wrap;
}

.wiki-planet-banner-stat {
    font-family: 'Roboto', sans-serif;
    font-size: calc(26px * var(--s));
    color: var(--wiki-text-dim);
}

.wiki-planet-banner-stat strong {
    color: var(--wiki-gold);
}

/* --- Item Row (resource/tool with description) --- */
.wiki-item-row {
    background: var(--wiki-card-bg);
    border: calc(1px * var(--s)) solid var(--wiki-card-border);
    border-radius: calc(30px * var(--s));
    padding: calc(18px * var(--s)) calc(22px * var(--s));
    margin-bottom: calc(12px * var(--s));
    display: flex;
    align-items: flex_start;
    gap: calc(18px * var(--s));
    transition: background 0.2s, border-color 0.2s;
}

.wiki-item-row:hover {
    background: var(--wiki-card-hover);
    border-color: rgba(255, 215, 0, 0.15);
}

.wiki-item-row img {
    width: calc(112px * var(--s));
    height: calc(112px * var(--s));
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 calc(2px * var(--s)) calc(4px * var(--s)) rgba(0, 0, 0, 0.4));
}

.wiki-item-body {
    flex: 1;
    min-width: 0;
}

.wiki-item-name {
    font-family: 'Lilita One', cursive;
    font-size: calc(40px * var(--s));
    color: #fff;
    margin-bottom: calc(3px * var(--s));
}

.wiki-item-stats {
    font-family: 'Roboto', sans-serif;
    font-size: calc(24px * var(--s));
    color: var(--wiki-gold);
    font-weight: 700;
    margin-bottom: calc(5px * var(--s));
}

.wiki-item-desc {
    font-family: 'Roboto', sans-serif;
    font-size: calc(26px * var(--s));
    color: var(--wiki-text-dim);
    line-height: 1.5;
}

/* --- Card Grid (achievements/medals) --- */
.wiki-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: calc(16px * var(--s));
}

@media (max-width: 768px) {
    .wiki-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.wiki-card {
    background: var(--wiki-card-bg);
    border: calc(1px * var(--s)) solid var(--wiki-card-border);
    border-radius: calc(30px * var(--s));
    padding: calc(20px * var(--s));
    text-align: center;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.wiki-card:hover {
    background: var(--wiki-card-hover);
    border-color: rgba(255, 215, 0, 0.2);
    transform: translateY(calc(-2px * var(--s)));
}

.wiki-card-img {
    width: calc(72px * var(--s));
    height: calc(72px * var(--s));
    object-fit: contain;
    margin-bottom: calc(12px * var(--s));
    filter: drop-shadow(0 calc(2px * var(--s)) calc(6px * var(--s)) rgba(0, 0, 0, 0.4));
}

.wiki-card-name {
    font-family: 'Lilita One', cursive;
    font-size: calc(16px * var(--s));
    color: #fff;
    margin-bottom: calc(6px * var(--s));
}

.wiki-card-meta {
    font-family: 'Roboto', sans-serif;
    font-size: calc(26px * var(--s));
    color: var(--wiki-text-dim);
    line-height: 1.5;
}

.wiki-card-meta strong {
    color: var(--wiki-gold);
}

.wiki-card-number {
    font-family: 'Lilita One', cursive;
    font-size: calc(11px * var(--s));
    color: var(--wiki-text-dim);
    margin-bottom: calc(4px * var(--s));
}

/* --- Back to Top --- */
.wiki-back-top {
    text-align: center;
    margin-top: calc(40px * var(--s));
}

.wiki-back-top a {
    font-family: 'Roboto', sans-serif;
    font-size: calc(26px * var(--s));
    color: var(--wiki-gold);
    text-decoration: none;
}

.wiki-back-top a:hover {
    text-decoration: underline;
}

/* --- Footer --- */
.wiki-footer {
    text-align: center;
    padding: calc(30px * var(--s)) 0;
    border-top: calc(1px * var(--s)) solid var(--wiki-card-border);
    margin-top: calc(40px * var(--s));
}

.wiki-footer a {
    font-family: 'Roboto', sans-serif;
    font-size: calc(26px * var(--s));
    color: var(--wiki-text-dim);
    text-decoration: none;
    margin: 0 calc(10px * var(--s));
}

.wiki-footer a:hover {
    color: var(--wiki-gold);
}

/* --- Intro Text --- */
.wiki-intro {
    font-family: 'Roboto', sans-serif;
    font-size: calc(32px * var(--s));
    color: var(--wiki-text);
    line-height: 1.7;
    text-align: center;
    max-width: calc(900px * var(--s));
    margin: 0 auto calc(40px * var(--s));
}

/* --- Hub card thumbnail image (non-planet, e.g. achievement/medal) --- */
.wiki-hub-card-thumb {
    width: calc(180px * var(--s));
    height: calc(180px * var(--s));
    object-fit: contain;
    filter: drop-shadow(0 calc(2px * var(--s)) calc(8px * var(--s)) rgba(0, 0, 0, 0.4));
}
