/* Placeholder styles – real design comes later */
body { margin: 0; font-family: sans-serif; background: #4b4c52; color: #eee; }
a { color: #6cf; text-decoration: none; }

/* Ball menu: centered at the top */
.ball { display: flex; justify-content: center; padding: 1.5rem 0; }
.ball svg { width: 280px; max-width: 90vw; height: auto; overflow: visible; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .8)); }

/* Puffy segments */
.seg path { fill: url(#g-seg); stroke: #0c0c0e; stroke-width: 3; }
.seg:hover path { fill: url(#g-seg-hover); }
.seg.active path { fill: url(#g-seg-active); }
.seg .hatch, .seg:hover .hatch, .seg.active .hatch { fill: url(#hatch); stroke: none; }
.seg.disabled path { fill: #151515; }
.seg.deco:hover path { fill: url(#g-seg); }   /* decoration: no hover */

/* White text with a light blue glow */
.seg text { fill: #fff; font-size: 27px; text-anchor: middle; dominant-baseline: middle; pointer-events: none; filter: url(#f-text); }
.seg.disabled text { fill: #666; filter: none; }

/* Home: very puffy, silver ring */
.home circle { fill: url(#g-home); }
.home.active circle { fill: url(#g-home-active); }
.home:hover circle { fill: url(#g-seg-hover); }
.home .ring { fill: none; stroke: url(#g-silver); stroke-width: 6; }
.home:hover .ring, .home.active .ring { fill: none; }
.home .gloss { fill: #fff; opacity: .14; pointer-events: none; }
.home text { font-size: 30px; font-weight: bold; }

/* Outer silver ring */
.outline { fill: none; stroke: url(#g-silver); stroke-width: 10; }

main { max-width: 900px; margin: 0 auto; padding: 1rem 2rem; text-align: center; }

/* Forms (register / login) */
.form { display: flex; flex-direction: column; gap: 1rem; max-width: 320px; margin: 0 auto; text-align: left; }
.form label { display: flex; flex-direction: column; gap: .3rem; }
.form input { padding: .5rem; background: #1d1d1d; border: 1px solid #888; color: #eee; }
.form button { padding: .6rem; background: #3a6d99; border: 0; color: #fff; cursor: pointer; }
.error { color: #f66; }

/* PIN keypad window */
.form .quick { background: #2a2a2a; border: 1px solid #888; }
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; }
.modal[hidden] { display: none; }
.keypad { background: #1a1a1a; border: 2px solid #888; border-radius: 12px; padding: 1.2rem; width: 240px; }
.pin-dots { font-size: 1.6rem; letter-spacing: .4rem; margin: .5rem 0 1rem; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.keys button { padding: .8rem 0; font-size: 1.3rem; background: #2a2a2a; color: #eee; border: 1px solid #555; border-radius: 8px; cursor: pointer; }
.keys button:hover { background: #2a4a66; }
.pin-login { width: 100%; margin-top: 1rem; padding: .7rem; background: #3a6d99; color: #fff; border: 0; border-radius: 8px; cursor: pointer; }

/* Admin + content */
.ok { color: #6c6; }
.form select, .form textarea { padding: .5rem; background: #1d1d1d; border: 1px solid #888; color: #eee; font: inherit; }
.news-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .4rem 0; border-bottom: 1px solid #333; text-align: left; }
.news-row button { background: #833; color: #fff; border: 0; padding: .3rem .8rem; cursor: pointer; }
.news { text-align: left; border-bottom: 1px solid #333; padding: .5rem 0; }
.news small { color: #888; }
.progress { display: flex; align-items: center; gap: 1rem; max-width: 500px; margin: .6rem auto; }
.progress span { width: 130px; text-align: right; }
.progress .bar { flex: 1; height: 14px; background: #222; border: 1px solid #555; }
.progress .bar div { height: 100%; background: #3a6d99; }
.progress b { width: 45px; text-align: left; }

/* Footer */
footer { margin-top: 3rem; padding: 1.2rem 2rem; border-top: 1px solid #333; background: #0b0b0b; text-align: center; font-size: .9rem; color: #888; }

/* Project tag above a news entry (Home page) */
.tag { display: inline-block; font-size: .75rem; padding: .1rem .5rem; border: 1px solid #3a6d99; border-radius: 4px; }

/* Page numbers under the news */
.pages { display: flex; justify-content: center; gap: .4rem; margin-top: 1.5rem; }
.pages a, .pages b { min-width: 2rem; padding: .3rem .5rem; border: 1px solid #555; border-radius: 4px; }
.pages b { background: #3a6d99; border-color: #3a6d99; color: #fff; }

/* News card (Home / project pages) */
.card { text-align: left; border: 2px solid #444; border-radius: 10px; padding: 1rem; margin: 1rem 0; background: #161616; }
.card-main { display: flex; gap: 1.2rem; }
.card img { width: 300px; height: 300px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.card h3 { margin: .5rem 0 .6rem; font-size: 1.5rem; line-height: 1.25; }
.card h3 a { color: #7fd0ff; text-shadow: 0 0 10px rgba(80, 180, 255, .35); }
.card h3 a:hover { color: #fff; }
@media (max-width: 700px) { .card-main { flex-direction: column; } .card img { width: 100%; height: auto; } }

/* Bottom bar: date, author, views, rating, comments */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem; margin-top: .8rem; padding: .5rem .8rem; border: 1px solid #333; border-radius: 6px; background: #101010; font-size: .85rem; color: #aaa; }
.meta span { display: inline-flex; align-items: center; gap: .35rem; }
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Rating stars */
.stars { display: flex; align-items: center; gap: .2rem; }
.stars button { background: none; border: 0; padding: .1rem; cursor: pointer; color: #666; }
.stars button .icon { width: 28px; height: 28px; }
.stars button.on .icon { fill: #f5c518; stroke: #f5c518; }
.stars:hover button .icon { fill: #f5c518; stroke: #f5c518; }
.stars button:hover ~ button .icon { fill: none; stroke: #666; }
.stars span { margin-left: .6rem; color: #aaa; font-size: .9rem; }

/* Comments */
.comment { border: 1px solid #333; border-radius: 8px; padding: .6rem .8rem; margin: .8rem 0; background: #161616; }
.comment .meta { margin: 0; border: 0; padding: 0; background: none; }
.comment .meta form { margin-left: auto; }
.del { background: #833; color: #fff; border: 0; padding: .2rem .7rem; cursor: pointer; border-radius: 4px; }
.comment-form { max-width: none; margin: 1rem 0; }

/* Full news page */
.news-full { text-align: left; }
.news-full small { color: #888; }
.main-img { float: left; width: 300px; max-width: 100%; height: auto; margin: .3rem 1.5rem 1rem 0; border-radius: 8px; cursor: zoom-in; }
.news-full::after { content: ''; display: block; clear: both; }
.news-full .links, .news-full .gallery { clear: both; }
@media (max-width: 640px) { .main-img { float: none; display: block; margin: 1rem auto; } }
.links { padding-left: 1.2rem; }
.gallery { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.gallery img { width: 300px; height: 300px; max-width: 100%; object-fit: cover; border-radius: 6px; }
#lightbox img { max-width: 95vw; max-height: 95vh; }
#lightbox { cursor: zoom-out; }

/* Admin: link rows */
.form fieldset { border: 1px solid #555; display: flex; flex-direction: column; gap: .5rem; }
.link-row { display: flex; gap: .5rem; }
.link-row input { flex: 1; padding: .5rem; background: #1d1d1d; border: 1px solid #888; color: #eee; }

/* Admin section bar */
.admin-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: .3rem; margin: 1rem 0 .5rem; padding: .4rem; background: #2a2b30; border: 1px solid #222; border-radius: 10px; }
.admin-tabs a { padding: .6rem 1.4rem; border-radius: 7px; color: #ddd; }
.admin-tabs a:hover { background: #3a3b42; color: #fff; }
.admin-tabs a.active { background: #3a6d99; color: #fff; }

/* Admin: users table */
.users { width: 100%; border-collapse: collapse; background: #1d1e22; border-radius: 8px; overflow: hidden; }
.users th, .users td { padding: .5rem .6rem; border-bottom: 1px solid #333; text-align: left; }
.users th { background: #2a2b30; font-weight: normal; color: #aaa; }
.users select { padding: .3rem; background: #2a2b30; color: #eee; border: 1px solid #555; }
.small { background: #3a6d99; color: #fff; border: 0; padding: .2rem .7rem; border-radius: 4px; cursor: pointer; }

/* Small "Site" button (admin panel instead of the ball menu) */
.site-btn { display: inline-block; margin: 1rem 0 0 1rem; padding: .4rem .9rem; background: #2a2b30; border: 1px solid #555; border-radius: 6px; color: #ddd; font-size: .9rem; }
.site-btn:hover { background: #3a6d99; color: #fff; }

/* Top: user panel left, ball menu always in the exact middle, slider right */
.top { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 2rem; padding: 1.5rem 1rem 0; }
.top .ball { padding: 0; grid-column: 2; }
.top .slider { grid-column: 3; justify-self: start; }
.top .user-panel { grid-column: 1; justify-self: end; }
/* Narrow screens: menu first, then user panel and slider under it */
@media (max-width: 1080px) {
    .top { grid-template-columns: 1fr; }
    .top .ball, .top .slider, .top .user-panel { grid-column: 1; justify-self: center; }
    .top .ball { order: 0; }
    .top .user-panel { order: 1; }
    .top .slider { order: 2; }
}

/* User panel: same size and frame as the slider */
.user-panel { box-sizing: border-box; width: 336px; height: 280px; max-width: 90vw; padding: 1rem; border-radius: 14px;
              border: 3px solid #c8c8cf; box-shadow: 0 0 6px rgba(255, 255, 255, .35), 0 10px 18px rgba(0, 0, 0, .8);
              background: radial-gradient(circle at 50% 30%, #3e3f46, #222327); display: flex; flex-direction: column; gap: 1rem; }
.up-head { display: flex; align-items: center; gap: 1rem; }
.avatar { width: 84px; height: 84px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
          background: radial-gradient(circle at 40% 30%, #6a6a74, #2a2a30); border: 3px solid #c8c8cf; box-shadow: 0 0 5px rgba(255, 255, 255, .3); }
.avatar svg { width: 54px; height: 54px; fill: none; stroke: #ddd; stroke-width: 1.6; stroke-linecap: round; }
.up-name { display: block; font-size: 1.3rem; font-weight: bold; color: #fff; text-shadow: 0 0 4px rgba(94, 200, 255, .45); }
a.up-name:hover { color: #7fd0ff; }
.up-group { display: inline-block; margin-top: .3rem; padding: .1rem .6rem; font-size: .8rem; border: 1px solid #3a6d99; border-radius: 4px; color: #ccc; }

/* Slider: same height as the menu (280px), 20% wider (336px) */
.slider { position: relative; box-sizing: border-box; width: 336px; height: 280px; max-width: 90vw; border-radius: 14px; overflow: hidden;
          border: 3px solid #c8c8cf; box-shadow: 0 0 6px rgba(255, 255, 255, .35), 0 10px 18px rgba(0, 0, 0, .8); }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .6s;
         display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .8rem; color: #fff; pointer-events: none; }
.slide.show { opacity: 1; pointer-events: auto; }
.slide-title { font-size: 1.5rem; font-weight: bold; text-align: center; padding: 0 2.5rem; text-shadow: 0 2px 6px rgba(0, 0, 0, .8); }
.slide-btn { position: absolute; right: 10px; bottom: 6px; padding: .2rem .7rem; font-size: .8rem; border-radius: 6px; background: rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .6); }
a.slide:hover .slide-btn { background: #3a6d99; }

.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; border: 0;
                background: rgba(0, 0, 0, .45); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; z-index: 2; }
.slider-arrow:hover { background: #3a6d99; }
.slider-arrow.prev { left: 8px; }
.slider-arrow.next { right: 8px; }

.slider-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: .4rem; z-index: 2; }
.slider-dots button { width: 11px; height: 11px; border-radius: 50%; border: 1px solid #fff; background: rgba(255, 255, 255, .25); cursor: pointer; padding: 0; }
.slider-dots button.on { background: #fff; }

/* Admin: slide list */
.slide-row { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid #333; text-align: left; }
.slide-row .swatch { width: 60px; height: 50px; border-radius: 6px; background-size: cover; background-position: center; flex-shrink: 0; }
.slide-row .info { flex: 1; }
.slide-row form { margin: 0; }
.small:disabled { opacity: .3; cursor: default; }
.up-logo { display: block; height: 220px; width: auto; margin: auto; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .6)); }

/* Avatar picture in the user panel card */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Profile page */
.profile-bar { display: flex; gap: .4rem; margin: 1rem auto 0; max-width: 900px; padding: .4rem; background: #2a2b30; border: 1px solid #222; border-radius: 10px; }
.profile-bar a { padding: .55rem 1.2rem; border-radius: 7px; color: #ddd; }
.profile-bar a:hover { background: #3a6d99; color: #fff; }
.profile-bar .logout { margin-left: auto; }
.profile-bar .logout:hover { background: #833; }
.profile-title { font-size: 3rem; letter-spacing: .3rem; margin: 1.5rem 0; }
.profile-card { display: flex; gap: 1.5rem; align-items: flex-start; text-align: left; max-width: 900px; margin: 0 auto; }
.profile-avatar { width: 150px; height: 150px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
                  background: radial-gradient(circle at 40% 30%, #6a6a74, #2a2a30); border: 3px solid #c8c8cf; box-shadow: 0 0 5px rgba(255, 255, 255, .3), 0 6px 12px rgba(0, 0, 0, .6); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar svg { width: 64px; height: 64px; fill: none; stroke: #ddd; stroke-width: 1.6; stroke-linecap: round; }
.avatar-form { margin-top: .5rem; }
.small-btn { display: block; width: 100%; box-sizing: border-box; text-align: center; padding: .3rem; font-size: .85rem; border: 0; border-radius: 6px; background: #3a6d99; color: #fff; cursor: pointer; }
.small-btn.grey { background: #2a2b30; border: 1px solid #555; }
.profile-login { font-size: 2rem; font-weight: bold; color: #fff; text-shadow: 0 0 4px rgba(94, 200, 255, .45); }

/* ===== Project info page ===== */
.p-title { font-size: 2.6rem; margin: 1.2rem 0; text-shadow: 0 0 6px rgba(94, 200, 255, .35); }

/* 3-part panel: narrow left, wide middle, narrow right */
.p-panel { display: grid; grid-template-columns: 190px minmax(0, 1fr) 190px; gap: 1rem; max-width: 1100px; margin: 0 auto; }
.p-panel > * { border-radius: 12px; border: 3px solid #c8c8cf; box-shadow: 0 0 6px rgba(255, 255, 255, .3), 0 8px 16px rgba(0, 0, 0, .7);
               background: radial-gradient(circle at 50% 30%, #3e3f46, #222327); }

.p-buttons { display: flex; flex-direction: column; gap: .5rem; padding: .7rem; }
.p-buttons a, .p-buttons span { display: block; padding: .6rem .7rem; border-radius: 8px; text-align: center; color: #fff;
                                background: radial-gradient(circle at 50% 35%, #55555e, #2c2c32); border: 1px solid #111;
                                box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }
.p-buttons a:hover { background: radial-gradient(circle at 50% 35%, #4f8cc2, #2b5680); }
.p-buttons span { color: #ccc; }

.p-media { aspect-ratio: 16 / 9; overflow: hidden; position: relative; padding: 0; }
.p-media iframe { width: 100%; height: 100%; border: 0; display: block; }
.p-slider { position: absolute; inset: 0; }
.p-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.p-slider img.show { opacity: 1; }
.p-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #888; }

.p-side { display: grid; grid-template-rows: 1fr auto; gap: .7rem; padding: .7rem; }
.p-version { display: flex; flex-direction: column; justify-content: center; align-items: center; border-radius: 8px; background: rgba(0, 0, 0, .25); }
.p-version small { color: #aaa; text-transform: uppercase; letter-spacing: .15rem; }
.p-version b { font-size: 2.2rem; color: #fff; text-shadow: 0 0 6px rgba(94, 200, 255, .45); word-break: break-all; }
.p-download { display: block; padding: .8rem; border-radius: 8px; text-align: center; font-weight: bold; color: #fff;
              background: radial-gradient(circle at 50% 35%, #5fae5f, #2f6f2f); border: 1px solid #111; }
.p-download:hover { filter: brightness(1.15); }
.p-download.off { background: #2a2b30; color: #888; font-weight: normal; }

/* Narrow screens: panel parts under each other */
@media (max-width: 800px) { .p-panel { grid-template-columns: 1fr; } }

/* Tabs */
.p-tabs { display: flex; justify-content: center; gap: .3rem; max-width: 1100px; margin: 1.5rem auto 0; padding: .4rem;
          background: #2a2b30; border: 1px solid #222; border-radius: 10px; }
.p-tabs button { padding: .6rem 1.4rem; border: 0; border-radius: 7px; background: none; color: #ddd; font-size: 1rem; cursor: pointer; }
.p-tabs button:hover { background: #3a3b42; color: #fff; }
.p-tabs button.on { background: #3a6d99; color: #fff; }
.p-tab { max-width: 1100px; margin: 1rem auto; text-align: left; }

/* Language flags */
.p-langs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.p-langs button { padding: .25rem; min-width: 44px; height: 34px; border: 2px solid transparent; border-radius: 6px; background: #2a2b30; color: #ddd; cursor: pointer; opacity: .6; }
.p-langs button img { height: 24px; display: block; margin: auto; }
.p-langs button:hover { opacity: 1; }
.p-langs button.on { opacity: 1; border-color: #5ec8ff; }

/* Admin: project info */
.admin-tabs.sub { background: #232428; }
.admin-tabs.sub a { padding: .4rem .9rem; font-size: .9rem; }
.form.wide { max-width: 700px; }
.lang-label { display: inline-flex; align-items: center; gap: .4rem; }
.lang-label img { height: 18px; }
.thumbs { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .6rem; }
.thumbs form { display: flex; flex-direction: column; gap: .3rem; }
.thumbs img { height: 90px; border-radius: 6px; }

/* Subscribe button (first in the left list of a project) */
.p-buttons form { margin: 0; }
.p-sub { display: block; width: 100%; box-sizing: border-box; padding: .6rem .7rem; border-radius: 8px; border: 1px solid #111; font: inherit; font-weight: bold; color: #fff; cursor: pointer; text-align: center;
         background: radial-gradient(circle at 50% 35%, #4f8cc2, #2b5680); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.p-sub small { margin-left: .3rem; padding: 0 .4rem; border-radius: 8px; background: rgba(0, 0, 0, .3); font-weight: normal; }
.p-sub.on { background: radial-gradient(circle at 50% 35%, #5fae5f, #2f6f2f); }
.p-sub:hover { filter: brightness(1.15); }

/* Round project icon */
.p-icon { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
          background: radial-gradient(circle at 40% 30%, #6a6a74, #2a2a30); border: 2px solid #c8c8cf; box-shadow: 0 0 4px rgba(255, 255, 255, .3), 0 4px 8px rgba(0, 0, 0, .6); }
.p-icon img { width: 100%; height: 100%; object-fit: cover; }
.p-icon span { font-size: 1.5rem; font-weight: bold; color: #fff; }

/* Profile: subscriptions */
.profile-subs { max-width: 900px; margin: 2rem auto 0; text-align: left; }
.sub-icons { display: flex; flex-wrap: wrap; gap: 1rem; }
.sub-icons a { display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 80px; color: #ddd; text-align: center; }
.sub-icons a:hover .p-icon { border-color: #5ec8ff; }
.sub-icons small { font-size: .75rem; }

/* Admin: icon row */
.icon-row { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: .5rem 0 1rem; }
.icon-row .small-btn { width: auto; padding: .3rem .8rem; }

/* Legal pages (Privacy Policy, Impressum) */
.legal { max-width: 900px; margin: 0 auto; text-align: left; line-height: 1.7; }
.legal-date { margin: -1.2rem 0 2rem; color: #aaa; font-size: .9rem; }
.legal section { margin: 0 0 1.4rem; padding: 1.2rem 1.5rem; border-radius: 14px; border: 3px solid #c8c8cf;
                 box-shadow: 0 0 6px rgba(255, 255, 255, .3), 0 10px 18px rgba(0, 0, 0, .7);
                 background: radial-gradient(circle at 30% 20%, #3e3f46, #222327); }
.legal h2 { display: flex; align-items: center; gap: .8rem; margin: 0 0 .8rem; padding-bottom: .6rem; border-bottom: 1px solid #555;
            font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.3rem; color: #fff; text-shadow: 0 0 6px rgba(94, 200, 255, .35); }
/* Round number badge */
.legal h2 span { flex-shrink: 0; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
                 font-size: 1rem; border: 2px solid #c8c8cf; background: radial-gradient(circle at 40% 30%, #6a6a74, #2a2a30);
                 box-shadow: 0 0 5px rgba(255, 255, 255, .3), 0 3px 6px rgba(0, 0, 0, .6); }
.legal p { margin: .6rem 0; color: #ddd; }
.legal b { color: #fff; }
/* Highlighted important text */
.legal mark { background: rgba(94, 200, 255, .15); color: #9fdcff; padding: 0 .25rem; border-radius: 4px; }
/* Custom list bullets */
.legal ul { list-style: none; padding-left: 0; margin: .6rem 0; }
.legal li { position: relative; margin: .45rem 0; padding-left: 1.4rem; color: #ddd; }
.legal li::before { content: '◆'; position: absolute; left: 0; color: #5ec8ff; font-size: .75rem; top: .25rem; }
/* Hint box and menu path */
.legal .note { padding: .6rem .9rem; border-left: 3px solid #5ec8ff; background: rgba(0, 0, 0, .25); border-radius: 0 8px 8px 0; }
.legal .path { font-family: monospace; padding: .1rem .4rem; border-radius: 5px; background: rgba(0, 0, 0, .35); color: #fff; }
.legal a { color: #5ec8ff; }

/* User panel: subscribed projects */
.up-subs { border-top: 1px solid #555; padding-top: .6rem; min-height: 0; overflow-y: auto; }
.up-subs small { color: #aaa; text-transform: uppercase; letter-spacing: .1rem; font-size: .7rem; }
.up-subs div { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.up-subs .p-icon { width: 40px; height: 40px; }
.up-subs .p-icon span { font-size: 1.1rem; }
.up-subs a:hover .p-icon { border-color: #5ec8ff; }
.up-subs p { margin: .3rem 0 0; font-size: .85rem; color: #888; }
.profile-count { margin: .5rem 0 0; color: #ccc; }

/* Karma */
.karma { font-weight: bold; padding: 0 .4rem; border-radius: 4px; }
.karma.plus { color: #6fdc6f; }
.karma.minus { color: #ff6b6b; }
.karma.zero { color: #aaa; }
.up-karma { display: block; margin-top: .3rem; font-size: .85rem; color: #aaa; }
.karma-box { display: flex; align-items: center; gap: .6rem; margin-top: 1rem; padding: .6rem .9rem; border-radius: 10px; background: #2a2b30; border: 1px solid #222; width: fit-content; }
.karma-box .karma { font-size: 1.6rem; }
.karma-vote { display: flex; align-items: center; gap: .4rem; margin: 0; }
.kv { width: 2.4rem; padding: .15rem 0; border-radius: 6px; border: 1px solid #555; background: #1d1e22; color: #ddd; cursor: pointer; font-size: .9rem; line-height: 1.2; }
.kv.up:hover, .kv.up.on { background: #2f6f2f; border-color: #5fae5f; color: #fff; }
.kv.down:hover, .kv.down.on { background: #833; border-color: #c55; color: #fff; }
.profile-info a, .meta a { color: inherit; }
.meta a:hover { color: #7fd0ff; }
.kv:disabled { cursor: default; opacity: .45; }
.kv.on:disabled { opacity: 1; }
.kv:disabled:not(.on):hover { background: #1d1e22; border-color: #555; color: #ddd; }
.karma-wait { color: #aaa; }

/* Comment with author block on the left */
.comment.with-author { display: flex; gap: 1rem; align-items: flex-start; }
.c-author { width: 90px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: .25rem; text-align: center; font-size: .85rem; }
.c-author b { word-break: break-word; }
.c-author .up-group { margin: 0; font-size: .7rem; }
.c-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
            background: radial-gradient(circle at 40% 30%, #6a6a74, #2a2a30); border: 2px solid #c8c8cf; box-shadow: 0 0 4px rgba(255, 255, 255, .3); }
.c-avatar img { width: 100%; height: 100%; object-fit: cover; }
.c-avatar svg { width: 34px; height: 34px; fill: none; stroke: #ddd; stroke-width: 1.6; stroke-linecap: round; }
.comment-body { flex: 1; min-width: 0; }
.comment-body p { margin: .5rem 0 0; }

/* Cinzel font (own files, SIL Open Font License – see fonts/OFL.txt) */
@font-face { font-family: 'Cinzel'; src: url('/fonts/cinzel-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('/fonts/cinzel-900.woff2') format('woff2'); font-weight: 900; font-display: swap; }

/* Beautiful heading: silver letters with a light blue glow */
.fancy { font-family: 'Cinzel', serif; font-weight: 900; font-size: 3.4rem; letter-spacing: .25rem; margin: 1.5rem 0 2rem;
         background: linear-gradient(180deg, #ffffff 0%, #d8d8e0 45%, #9a9aa6 55%, #f2f2f6 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
         filter: drop-shadow(0 0 6px rgba(94, 200, 255, .45)) drop-shadow(0 3px 3px rgba(0, 0, 0, .7)); }

/* All Games: 3 round icons in a row */
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem 2rem; max-width: 760px; margin: 0 auto; }
.games-grid a { display: flex; flex-direction: column; align-items: center; gap: .8rem; color: #fff; }
.game-icon { width: 170px; height: 170px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center;
             background: radial-gradient(circle at 40% 30%, #6a6a74, #2a2a30); border: 4px solid #c8c8cf;
             box-shadow: 0 0 8px rgba(255, 255, 255, .35), 0 10px 18px rgba(0, 0, 0, .7); transition: transform .2s, box-shadow .2s; }
.game-icon img { width: 100%; height: 100%; object-fit: cover; }
.game-icon span { font-family: 'Cinzel', serif; font-weight: 900; font-size: 4rem; color: #fff; }
.games-grid a:hover .game-icon { transform: scale(1.05); box-shadow: 0 0 14px rgba(94, 200, 255, .7), 0 12px 20px rgba(0, 0, 0, .7); }
.game-name { font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.15rem; letter-spacing: .05rem; text-shadow: 0 0 6px rgba(94, 200, 255, .4); }
@media (max-width: 640px) { .games-grid { grid-template-columns: repeat(2, 1fr); } .game-icon { width: 130px; height: 130px; } }

/* ===== Progress page ===== */
.pr-list { max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.6rem; text-align: left; }
.pr-name { display: inline-block; margin-bottom: .45rem; font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.35rem; color: #fff;
           text-shadow: 0 0 6px rgba(94, 200, 255, .4); }
a.pr-name:hover { color: #7fd0ff; }

/* Framed bar: colour from red (0%) to light green (100%), dark cover hides the rest */
.pr-bar { position: relative; height: 40px; border-radius: 20px; overflow: hidden; border: 3px solid #c8c8cf;
          box-shadow: 0 0 6px rgba(255, 255, 255, .35), 0 6px 12px rgba(0, 0, 0, .7), inset 0 2px 6px rgba(0, 0, 0, .6);
          background: linear-gradient(90deg, #d42a2a 0%, #e8792a 30%, #e8d23a 60%, #8fe36a 100%); }
.pr-cover { position: absolute; top: 0; right: 0; bottom: 0; background: linear-gradient(180deg, #2c2c32, #1b1b1f); transition: width .6s; }
.pr-bar::after { content: ''; position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0)); pointer-events: none; }
.pr-text, .pr-percent { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: .95rem;
                        text-shadow: 0 1px 2px rgba(0, 0, 0, .9), 0 0 4px rgba(0, 0, 0, .8); z-index: 1; }
.pr-text { left: 1.1rem; }
.pr-percent { right: 1.1rem; font-size: 1.05rem; }

/* Admin: progress table */
.pr-admin input { width: 100%; box-sizing: border-box; padding: .35rem; background: #1d1d1d; border: 1px solid #555; color: #eee; }
.pr-admin .pct { width: 4.5rem; }
.nowrap { white-space: nowrap; }
form.inline { display: inline; margin: 0; }
.save-all { padding: .5rem 1.4rem; }

/* ===== Profile (new design) ===== */
.pf-card, .pf-box { max-width: 900px; margin: 0 auto 1.5rem; padding: 1.4rem; box-sizing: border-box; text-align: left; border-radius: 14px;
                    border: 3px solid #c8c8cf; box-shadow: 0 0 6px rgba(255, 255, 255, .3), 0 10px 18px rgba(0, 0, 0, .7);
                    background: radial-gradient(circle at 30% 20%, #3e3f46, #222327); }
.pf-card { display: flex; gap: 2rem; align-items: flex-start; }
.pf-left { width: 156px; flex-shrink: 0; }
.pf-right { flex: 1; min-width: 0; }
.pf-login { font-family: 'Cinzel', serif; font-weight: 900; font-size: 2.2rem; color: #fff; text-shadow: 0 0 6px rgba(94, 200, 255, .45); word-break: break-word; }
.pf-since { margin: .5rem 0 0; color: #aaa; font-size: .9rem; }

/* Stat tiles */
.pf-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-top: 1.2rem; }
.pf-stats div { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .8rem .4rem; border-radius: 10px;
                background: rgba(0, 0, 0, .3); border: 1px solid #111; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.pf-stats b, .pf-stats .karma { font-size: 1.7rem; font-weight: bold; color: #fff; }
.pf-stats small { color: #aaa; text-transform: uppercase; letter-spacing: .08rem; font-size: .7rem; }

.pf-box h2 { margin: 0 0 1rem; font-family: 'Cinzel', serif; font-weight: 700; font-size: 1.3rem; }
.muted { color: #999; }

/* Settings: click to open */
.pf-box details { border-top: 1px solid #444; padding: .7rem 0; }
.pf-box summary { cursor: pointer; font-weight: bold; color: #ddd; list-style: none; }
.pf-box summary::before { content: '▸ '; color: #5ec8ff; }
.pf-box details[open] summary::before { content: '▾ '; }
.pf-box summary:hover { color: #fff; }
.pf-box details .form { margin: 1rem 0 .4rem; }
.pf-box .danger summary { color: #ff8a8a; }
.form .check { flex-direction: row; align-items: center; gap: .5rem; }

@media (max-width: 700px) {
    .pf-card { flex-direction: column; align-items: center; }
    .pf-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Support page ===== */
.sup-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.sup-grid .pf-box { max-width: none; margin: 0; }
.sup-grid .form.wide { max-width: none; }
.form input.hp { display: none; }
/* Two big choice buttons: admin on site / support e-mail */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.choice label { cursor: pointer; }
.choice input { display: none; }
.choice span { display: flex; flex-direction: column; gap: .2rem; height: 100%; box-sizing: border-box; padding: .7rem; border-radius: 10px;
               background: rgba(0, 0, 0, .3); border: 2px solid #555; transition: border-color .2s, box-shadow .2s; }
.choice small { color: #aaa; font-size: .75rem; word-break: break-word; }
.choice input:checked + span { border-color: #5ec8ff; box-shadow: 0 0 8px rgba(94, 200, 255, .4); }
/* Partnership types as small tags */
.sup-types { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.sup-types li { padding: .2rem .6rem; border-radius: 20px; font-size: .8rem; border: 1px solid #5ec8ff; color: #9fdcff; background: rgba(94, 200, 255, .1); }

/* Admin: messages */
.msg { max-width: 900px; margin: 0 auto 1rem; padding: 1rem; text-align: left; border-radius: 10px; background: #2a2b30; border: 1px solid #555; }
.msg.new { border-color: #5ec8ff; box-shadow: 0 0 6px rgba(94, 200, 255, .35); }
.msg-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .85rem; color: #aaa; }
.msg-head .tag { padding: .1rem .5rem; border-radius: 12px; background: #3a6d99; color: #fff; }
.msg-head .tag.partner { background: #6a4a99; }
.msg-body { white-space: pre-wrap; margin: .7rem 0; color: #eee; }
.msg-actions { display: flex; gap: .5rem; }
.msg-actions form { margin: 0; }

/* ===== Notifications ===== */
.up-bell { display: inline-block; margin-left: .4rem; padding: 0 .45rem; border-radius: 10px; font-size: .8rem; background: #e05555; color: #fff; vertical-align: middle; }
.sub-link { position: relative; display: inline-block; }
.sub-new { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 3px; box-sizing: border-box; border-radius: 8px;
           font-size: .65rem; line-height: 16px; text-align: center; background: #e05555; color: #fff; box-shadow: 0 0 4px rgba(0, 0, 0, .6); }
.badge { display: inline-block; min-width: 1.2rem; padding: 0 .4rem; margin-left: .3rem; border-radius: 10px; background: #e05555; color: #fff;
         font-size: .75rem; font-family: sans-serif; vertical-align: middle; }
.notes { list-style: none; padding: 0; margin: 0 0 1rem; }
.notes li { display: flex; justify-content: space-between; gap: 1rem; padding: .5rem .6rem; border-bottom: 1px solid #3a3a40; }
.notes li.new { background: rgba(94, 200, 255, .1); border-left: 3px solid #5ec8ff; }
.notes li small { color: #888; white-space: nowrap; }
.notes a { color: #ddd; }
.notes li.new a { color: #fff; font-weight: bold; }
.my-msg { padding: .7rem 0; border-bottom: 1px solid #3a3a40; }
.msg-reply { margin: .5rem 0; padding: .6rem .8rem; white-space: pre-wrap; border-left: 3px solid #6c6; background: rgba(0, 0, 0, .25); border-radius: 0 8px 8px 0; color: #eee; }
.msg-reply small { display: block; color: #8c8; margin-bottom: .2rem; white-space: normal; }
.msg-reply-form { margin: .5rem 0; gap: .5rem; }

/* ===== Admin: edit news, ban, statistics ===== */
.edit-btn { padding: .3rem .8rem; background: #3a6d99; color: #fff; border-radius: 3px; }
.news-row span { flex: 1; }
.edit-pic { display: flex; align-items: center; gap: 1rem; }
.edit-pic img, .edit-gallery img { border-radius: 6px; object-fit: cover; }
.edit-gallery { display: flex; flex-wrap: wrap; gap: .6rem; }
.edit-gallery label { display: flex; flex-direction: column; align-items: center; gap: .2rem; cursor: pointer; }
.ban-form { display: flex; gap: .3rem; }
.ban-form input { width: 90px; padding: .3rem; background: #2a2b30; color: #eee; border: 1px solid #555; }
.banned { color: #ff8a8a; font-size: .85rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; margin-bottom: 2rem; }
.stat-grid div { display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .9rem .4rem; border-radius: 10px;
                 background: radial-gradient(circle at 30% 20%, #3e3f46, #222327); border: 2px solid #c8c8cf; box-shadow: 0 6px 12px rgba(0, 0, 0, .5); }
.stat-grid b { font-size: 1.6rem; color: #fff; }
.stat-grid small { color: #aaa; font-size: .75rem; text-transform: uppercase; letter-spacing: .05rem; text-align: center; }
.day-bars { display: flex; align-items: flex-end; gap: 4px; height: 140px; margin-bottom: 2rem; padding: .5rem; background: #1d1e22; border-radius: 8px; }
.day-bars div { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.day-bars span { width: 100%; min-height: 2px; background: linear-gradient(#7fd0ff, #3a6d99); border-radius: 3px 3px 0 0; }
.day-bars b { font-size: .7rem; color: #fff; order: -1; }
.day-bars small { font-size: .65rem; color: #888; }

/* ===== Users page ===== */
.sort-bar { display: flex; justify-content: center; gap: .4rem; margin: 0 0 1.5rem; }
.sort-bar a { padding: .4rem 1rem; border-radius: 20px; background: #2a2b30; border: 1px solid #555; color: #ddd; }
.sort-bar a.active { background: #3a6d99; border-color: #3a6d99; color: #fff; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1rem; }
.user-tile { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: 1rem .5rem; border-radius: 12px; color: #ddd;
             background: radial-gradient(circle at 30% 20%, #3e3f46, #222327); border: 2px solid #c8c8cf; box-shadow: 0 6px 12px rgba(0, 0, 0, .5);
             transition: transform .15s, box-shadow .15s; }
.user-tile:hover { transform: translateY(-3px); box-shadow: 0 0 10px rgba(94, 200, 255, .4), 0 8px 14px rgba(0, 0, 0, .6); }
.user-tile .avatar { width: 70px; height: 70px; overflow: hidden; }
.ut-name { font-weight: bold; color: #fff; word-break: break-word; }
.ut-info { font-size: .85rem; }

/* ===== 404, footer links, ads ===== */
.nf-box { text-align: center; }
.nf-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.nf-btn { padding: .5rem 1.2rem; border-radius: 8px; background: #3a6d99; color: #fff; }
.foot-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem 1.2rem; margin-bottom: .6rem; }
.foot-links a { color: #aaa; }
.foot-links a:hover { color: #fff; }
.ad { max-width: 900px; margin: 1.5rem auto; text-align: center; }

/* ===== Project rating (stars) ===== */
/* Middle column: same size as before, media 25px narrower, rating box under it */
.p-panel > .p-center { display: flex; flex-direction: column; align-items: center; gap: .6rem; min-width: 0; aspect-ratio: 16 / 9;
                       border: 0; border-radius: 0; box-shadow: none; background: none; }
.p-center .p-media { aspect-ratio: auto; flex: 1; min-height: 0; width: calc(100% - 25px); box-sizing: border-box; }
.p-center .p-media { border-radius: 12px; border: 3px solid #c8c8cf; box-shadow: 0 0 6px rgba(255, 255, 255, .3), 0 8px 16px rgba(0, 0, 0, .7);
                     background: radial-gradient(circle at 50% 30%, #3e3f46, #222327); }
.p-rate { width: calc(100% - 25px); box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: .8rem;
          padding: .35rem .8rem; border-radius: 12px; border: 3px solid #c8c8cf;
          box-shadow: 0 0 6px rgba(255, 255, 255, .3), 0 8px 16px rgba(0, 0, 0, .7); background: radial-gradient(circle at 50% 30%, #3e3f46, #222327); }

/* Stars: grey stars below, golden stars on top, cut at --fill */
.stars { position: relative; display: inline-block; line-height: 1; font-size: 1.6rem; white-space: nowrap; }
.stars::before { content: '★★★★★'; color: #1c1d21; text-shadow: 0 1px 0 rgba(255, 255, 255, .12); }
.stars::after { content: '★★★★★'; position: absolute; left: 0; top: 0; width: var(--fill, 0%); overflow: hidden;
                background: linear-gradient(180deg, #fff3b0, #ffd34a 45%, #d99a1e); -webkit-background-clip: text; background-clip: text; color: transparent;
                filter: drop-shadow(0 0 4px rgba(255, 200, 60, .55)); }
.stars.big { font-size: 2.1rem; }
.stars.huge { font-size: 3.4rem; }
.stars.pick { cursor: pointer; }
.p-score { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.p-score b { font-size: 1.3rem; color: #fff; }
.p-score small { color: #aaa; font-size: .7rem; }
.p-rate-btn { padding: .45rem 1rem; border: 1px solid #111; border-radius: 8px; color: #fff; font-weight: bold; cursor: pointer;
              background: radial-gradient(circle at 50% 35%, #e0b23c, #8a6214); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 3px 6px rgba(0, 0, 0, .5); }
.p-rate-btn:hover { filter: brightness(1.15); }

/* Rating window */
.rate-dialog { padding: 1.5rem 2rem; border-radius: 16px; border: 3px solid #c8c8cf; color: #eee; text-align: center; max-width: 92vw;
               background: radial-gradient(circle at 30% 20%, #45464e, #1f2024); box-shadow: 0 0 14px rgba(94, 200, 255, .35), 0 20px 40px rgba(0, 0, 0, .8); }
.rate-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.rate-dialog h2 { margin: 0 0 1rem; font-family: 'Cinzel', serif; }
.rate-show { margin: .6rem 0 1rem; color: #aaa; }
.rate-show b { font-size: 1.6rem; color: #fff; }
.rate-buttons { display: flex; justify-content: center; gap: .8rem; }
.rate-buttons button { padding: .55rem 1.6rem; border: 1px solid #111; border-radius: 8px; color: #fff; font-weight: bold; cursor: pointer;
                       background: radial-gradient(circle at 50% 35%, #e0b23c, #8a6214); }
.rate-buttons button.grey { background: #2a2b30; border-color: #555; font-weight: normal; }
.rate-buttons button:disabled { opacity: .45; cursor: default; }

/* Narrow screens: panel parts under each other, picture 16:9 again */
@media (max-width: 800px) {
    .p-panel > .p-center { aspect-ratio: auto; }
    .p-center .p-media { aspect-ratio: 16 / 9; flex: none; width: 100%; }
    .p-rate { width: 100%; }
}

/* ===== Tablet and mobile ===== */
/* Tablet: menu on top, user panel and slider side by side under it */
@media (max-width: 1080px) and (min-width: 721px) {
    .top { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
    .top .ball { grid-column: 1 / 3; justify-self: center; }
    .top .user-panel { grid-column: 1; justify-self: end; }
    .top .slider { grid-column: 2; justify-self: start; }
}

/* Mobile */
@media (max-width: 720px) {
    main { padding: 1rem .8rem; }
    .top { gap: 1.2rem; padding: 1rem .8rem 0; }
    .user-panel { width: 100%; max-width: 400px; height: auto; }
    .slider { width: 100%; max-width: 400px; height: 210px; }
    .fancy { font-size: 2.2rem; letter-spacing: .1rem; margin: 1rem 0 1.5rem; }
    .pf-login { font-size: 1.7rem; }
    .pf-card, .pf-box, .legal section { padding: 1rem; }
    .profile-bar { flex-wrap: wrap; justify-content: center; gap: .3rem; }
    .profile-bar a { padding: .5rem .8rem; }
    .profile-bar .logout { margin-left: 0; }
    .legal h2 { font-size: 1.1rem; }
    .choice { grid-template-columns: 1fr; }
    .stars.huge { font-size: 2.6rem; }
    /* Wide admin tables scroll sideways instead of breaking the page */
    .users { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Hint under a form and yellow warning box */
.hint { margin: 0; padding: .6rem .8rem; font-size: .85rem; color: #ccc; border-left: 3px solid #5ec8ff; background: rgba(0, 0, 0, .25); border-radius: 0 8px 8px 0; }
.warn-box { max-width: 900px; margin: 0 auto 1.5rem; box-sizing: border-box; padding: .8rem 1rem; text-align: left; border-radius: 10px;
            color: #ffe6a0; background: rgba(255, 190, 60, .12); border: 1px solid #c9a24a; }

/* ===== Group colours ===== */
.up-group.g-newbie    { border-color: #777;    color: #bbb; }
.up-group.g-user      { border-color: #3a6d99; color: #cfe6ff; }
.up-group.g-fan       { border-color: #3fa66b; color: #9de8bb; }
.up-group.g-big-fan   { border-color: #2fd17a; color: #b8ffd6; background: rgba(47, 209, 122, .12); }
.up-group.g-helper    { border-color: #4ec3c3; color: #b5f2f2; }
.up-group.g-sponsor   { border-color: #d4af37; color: #ffe08a; background: rgba(212, 175, 55, .12); }
.up-group.g-partner   { border-color: #c98a3a; color: #ffd2a0; }
.up-group.g-developer { border-color: #7b6cff; color: #d2ccff; }
.up-group.g-designer  { border-color: #e06cc6; color: #ffc9f1; }
.up-group.g-marketer  { border-color: #ff8c42; color: #ffd0b0; }
.up-group.g-blogger   { border-color: #ff5e7a; color: #ffc2cd; }
.up-group.g-tester    { border-color: #a0c040; color: #e2f5a8; }
.up-group.g-moderator { border-color: #5ec8ff; color: #c9eeff; background: rgba(94, 200, 255, .12); }
.up-group.g-admin     { border-color: #e05555; color: #ffc0c0; background: rgba(224, 85, 85, .15); }

/* Profile: progress to the next group */
.pf-next { margin-top: .8rem; display: flex; flex-direction: column; gap: .35rem; max-width: 360px; }
.pf-next small { color: #aaa; }
.pf-bar { position: relative; height: 18px; border-radius: 9px; background: rgba(0, 0, 0, .4); border: 1px solid #555; overflow: hidden; }
.pf-bar span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #3a6d99, #5ec8ff); }
.pf-bar em { position: relative; display: block; text-align: center; font-style: normal; font-size: .75rem; line-height: 18px; color: #fff; text-shadow: 0 1px 2px #000; }

/* ===== Admin: ads ===== */
.ads-form textarea { font-family: monospace; font-size: .8rem; }
.ads-form fieldset { gap: .7rem; padding: 1rem; }
.ads-switch { padding: .7rem; border-radius: 8px; background: rgba(0, 0, 0, .3); border: 1px solid #555; }
.ads-page { border-top: 1px solid #444; padding: .5rem 0; }
.ads-page summary { cursor: pointer; font-weight: bold; }
.ads-page label { margin-top: .5rem; }
.ads-on { color: #6c6; font-size: .8rem; font-weight: normal; }

/* ===== Project feedback ===== */
.p-fb { background: radial-gradient(circle at 50% 35%, #4f8cc2, #2b5680); }
.fb-form { max-width: none; }
.fb-as { margin: 0; color: #aaa; }
.fb-empty { text-align: center; }
/* Version: green frame, always well visible */
.fb-ver { display: inline-block; padding: .1rem .6rem; border-radius: 20px; font-weight: bold; font-size: .85rem; letter-spacing: .03rem;
          color: #b8ffd0; border: 2px solid #3ccf6e; background: linear-gradient(180deg, rgba(60, 207, 110, .28), rgba(20, 90, 45, .35));
          box-shadow: 0 0 8px rgba(60, 207, 110, .45), inset 0 1px 0 rgba(255, 255, 255, .2); text-shadow: 0 1px 2px #000; }
.fb-item { margin: 0 0 .9rem; padding: .9rem 1.1rem; border-radius: 12px; border: 2px solid #c8c8cf;
           background: radial-gradient(circle at 30% 20%, #3e3f46, #222327); box-shadow: 0 6px 12px rgba(0, 0, 0, .5); }
.fb-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.fb-head small { color: #888; }
.fb-body { margin-top: .6rem; color: #ddd; line-height: 1.5; word-break: break-word; }
.fb-del { margin: 0 0 0 auto; }
.fb-del button { background: none; border: 0; color: #888; font-size: 1.3rem; cursor: pointer; line-height: 1; }
.fb-del button:hover { color: #ff6b6b; }
.up-group.g-guest { border-color: #666; color: #999; border-style: dashed; }
.fb-form .form.wide { max-width: none; margin: 0; }

/* ===== Project guide ===== */
.guide-search { width: 100%; box-sizing: border-box; margin-bottom: 1rem; padding: .7rem 1rem; border-radius: 10px; border: 2px solid #555;
                background: #1d1d1d; color: #eee; font-size: 1rem; }
.guide-search:focus { outline: none; border-color: #5ec8ff; }
.guide-item { margin: 0 0 .7rem; border-radius: 12px; border: 2px solid #c8c8cf; overflow: hidden;
              background: radial-gradient(circle at 30% 20%, #3e3f46, #222327); box-shadow: 0 6px 12px rgba(0, 0, 0, .5); }
.guide-item summary { cursor: pointer; list-style: none; padding: .9rem 1.2rem; font-weight: bold; font-size: 1.05rem; color: #fff; }
.guide-item summary::-webkit-details-marker { display: none; }
.guide-item summary::before { content: '▸'; display: inline-block; width: 1.2rem; color: #5ec8ff; }
.guide-item[open] summary::before { content: '▾'; }
.guide-item[open] summary { border-bottom: 1px solid #444; }
.guide-body { padding: .9rem 1.2rem 1.1rem 2.4rem; color: #ddd; line-height: 1.6; }
.guide-body ul { margin: .3rem 0; padding-left: 1.2rem; }
h2 + .hint { margin-bottom: 1rem; }
.guide-admin { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #444; }
.guide-admin .form { flex: 1; margin: 0; }
.guide-admin-tools { display: flex; flex-direction: column; gap: .3rem; }
.guide-admin-tools form { margin: 0; }
.guide-pics { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.guide-pics img { width: 160px; height: 160px; object-fit: cover; border-radius: 8px; border: 2px solid #c8c8cf; box-shadow: 0 4px 8px rgba(0, 0, 0, .5); transition: transform .15s; }
.guide-pics a:hover img { transform: scale(1.04); border-color: #5ec8ff; }
.guide-admin-main { flex: 1; min-width: 0; }
.guide-admin-main .form { margin: 0; }
.guide-admin-pics { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; max-width: 700px; margin: .6rem 0 0; }
.guide-admin-pics form { position: relative; margin: 0; }
.guide-admin-pics img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; display: block; }
.guide-admin-pics .del { position: absolute; top: -6px; right: -6px; padding: 0 .35rem; border-radius: 50%; line-height: 1.3; }
.guide-admin-pics .small-btn { width: auto; padding: .4rem .9rem; }
@media (max-width: 640px) { .guide-pics img { width: calc(50vw - 3rem); height: calc(50vw - 3rem); } }

/* ===== Version history ===== */
.v-list { display: flex; flex-direction: column; gap: .8rem; }
.v-item { padding: .9rem 1.1rem; border-radius: 12px; border: 2px solid #c8c8cf;
          background: radial-gradient(circle at 30% 20%, #3e3f46, #222327); box-shadow: 0 6px 12px rgba(0, 0, 0, .5); }
.v-item.current { border-color: #3ccf6e; box-shadow: 0 0 10px rgba(60, 207, 110, .35), 0 6px 12px rgba(0, 0, 0, .5); }
.v-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.v-head small { color: #888; margin-left: auto; }
.v-now { font-size: .75rem; text-transform: uppercase; letter-spacing: .08rem; color: #3ccf6e; font-weight: bold; }
.v-text { color: #ddd; line-height: 1.6; }
.v-text ul { margin: .2rem 0; padding-left: 1.2rem; }
.v-admin-new { padding: 1rem; border: 2px solid #3ccf6e; border-radius: 10px; margin-bottom: 1rem; }
.v-admin-new h3 { margin: 0; }
.v-admin { max-width: 700px; margin: 0 auto; text-align: left; }
.v-admin form { margin: .6rem 0; }

/* Version tab: one button per version (only the number) */
.v-bar { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.2rem 0 1rem; padding: .5rem; border-radius: 10px; background: #2a2b30; border: 1px solid #444; }
.v-bar button { min-width: 64px; padding: .35rem .7rem; border-radius: 7px; border: 2px solid #555; background: #1f2024; color: #ccc;
                font-weight: bold; font-size: .9rem; cursor: pointer; }
.v-bar button:hover { border-color: #888; color: #fff; }
.v-bar button.cur { border-color: #2f7a4a; }
.v-bar button.on { color: #b8ffd0; border-color: #3ccf6e; background: linear-gradient(180deg, rgba(60, 207, 110, .3), rgba(20, 90, 45, .4));
                   box-shadow: 0 0 8px rgba(60, 207, 110, .45); }
.v-bar .v-more { color: #9fdcff; border-color: #3a6d99; }

/* ===== Admin: edit slides and project pictures ===== */
.slide-edit { max-width: 420px; margin: .6rem auto 1rem; padding: 1rem; border: 2px solid #3a6d99; border-radius: 10px; background: #26272c; }
.thumb { display: flex; flex-direction: column; gap: .3rem; align-items: center; }
.thumb-tools { display: flex; gap: .25rem; align-items: center; }
.thumb-tools form { margin: 0; }
.replace-btn { display: inline-block; padding: .2rem .5rem; border-radius: 3px; background: #3a6d99; color: #fff; cursor: pointer; font-size: .9rem; }

/* Fill / Fit choice for slider pictures */
.fit-choice { display: flex; flex-direction: column; gap: .3rem; padding: .6rem .8rem; border-radius: 8px; background: rgba(0, 0, 0, .25); border: 1px solid #555; }
.fit-choice label { flex-direction: row; align-items: center; gap: .4rem; font-size: .9rem; }
.fit-btn { min-width: 38px; }
.fit-btn.on { background: #2f8a55; }
.fit-tag { font-size: .7rem; padding: 0 .4rem; border-radius: 8px; background: #2a2b30; border: 1px solid #555; color: #aaa; vertical-align: middle; }

/* ===== Slider pictures: Fill / Fit (page and admin preview use the same rules) ===== */
.pic { background: var(--img, none) center / cover no-repeat; }
.pic.fit { background: none; isolation: isolate; overflow: hidden; }
.pic.fit::before, .pic.fit::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--img) center / cover no-repeat; }
.pic.fit::before { inset: -30px; filter: blur(16px) brightness(.55); }
.pic.fit::after { background-size: contain; }
.p-pic { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; }
.p-pic.show { opacity: 1; }

/* Admin: Fill / Fit switch and preview in the real sizes */
.fit-switch { display: flex; flex-direction: column; gap: .6rem; padding: .8rem; border-radius: 10px; background: rgba(0, 0, 0, .25); border: 1px solid #555; }
.fit-switch .hint { margin: 0; }
.seg { display: inline-flex; align-self: flex-start; border-radius: 20px; overflow: hidden; border: 2px solid #555; }
.seg label { display: block; cursor: pointer; }
.seg input { display: none; }
.seg span { display: block; padding: .4rem 1.3rem; font-weight: bold; color: #aaa; background: #1f2024; }
.seg input:checked + span { color: #fff; background: #3a6d99; }
.fit-previews { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-end; }
.fit-previews figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.fit-previews figcaption { font-size: .75rem; color: #999; }
.fit-previews.empty figure { display: none; }
.fit-previews:not(.empty) .fit-wait { display: none; }
.fit-box { position: relative; overflow: hidden; border-radius: 12px; border: 3px solid #c8c8cf; background: #222327; }
.fit-box .pic { position: absolute; inset: 0; }
.box-s { width: 336px; height: 280px; }
.box-s-phone { width: 182px; height: 105px; }
.box-p { width: 463px; height: 212px; }
.box-p-phone { width: 182px; height: 102px; }
.fit-dialog { max-width: 95vw; }
.fit-dialog form { display: flex; flex-direction: column; gap: 1rem; }
.form:has(.fit-switch) { max-width: 440px; }

/* Admin: karma history */
.karma-filter { display: flex; justify-content: center; gap: .5rem; margin-bottom: 1rem; }
.karma-filter input { padding: .5rem; width: 240px; background: #1d1d1d; border: 1px solid #888; color: #eee; }
.karma-filter button { padding: .5rem 1rem; background: #3a6d99; color: #fff; border: 0; cursor: pointer; }
.karma-filter a { align-self: center; }
.karma-sum { padding: .6rem 1rem; border-radius: 8px; background: rgba(0, 0, 0, .25); display: inline-block; }
.k-up { color: #6c6; font-weight: bold; }
.k-down { color: #f66; font-weight: bold; }
.karma-log { margin: 0 auto; }
.dev-text { line-height: 1.7; }

/* ===== RawGo projects (tab "Projects" on the RawGo page) ===== */
.rg-count { text-align: center; }
.rg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.rg-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 12px; border: 2px solid #c8c8cf; color: #ddd;
           background: radial-gradient(circle at 30% 20%, #3e3f46, #222327); box-shadow: 0 6px 12px rgba(0, 0, 0, .5); transition: transform .15s, box-shadow .15s; }
.rg-card:hover { transform: translateY(-3px); box-shadow: 0 0 10px rgba(94, 200, 255, .45), 0 8px 14px rgba(0, 0, 0, .6); }
.rg-img { position: relative; aspect-ratio: 13 / 20; background: #18191c; }
.rg-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rg-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.rg-badge { position: absolute; top: 8px; right: 8px; padding: .1rem .6rem; border-radius: 20px; font-size: .7rem; font-weight: bold; border: 1px solid; backdrop-filter: blur(6px); }
.rg-badge.live { color: #3ccf6e; border-color: #3ccf6e; background: rgba(60, 207, 110, .18); }
.rg-badge.beta { color: #5ec8ff; border-color: #5ec8ff; background: rgba(94, 200, 255, .18); }
.rg-badge.dev { color: #ff9a3c; border-color: #ff9a3c; background: rgba(255, 154, 60, .18); }
.rg-body { display: flex; flex-direction: column; gap: .4rem; padding: .8rem; flex: 1; }
.rg-title { color: #fff; font-size: 1rem; line-height: 1.3; }
.rg-meta { display: flex; justify-content: space-between; align-items: center; gap: .4rem; font-size: .8rem; color: #999; }
.rg-meta .fb-ver { font-size: .7rem; padding: 0 .45rem; }
.rg-desc { font-size: .85rem; color: #aaa; line-height: 1.4; flex: 1; }
.rg-stats { display: flex; gap: .7rem; font-size: .8rem; color: #999; }
.rg-star { color: #ffd34a; }
.rg-btn { margin-top: .3rem; padding: .45rem; border-radius: 8px; text-align: center; font-weight: bold; color: #fff; background: #3a6d99; }
.rg-card:hover .rg-btn { background: #4f8cc2; }
.rg-pages { margin-top: 1.2rem; }
@media (max-width: 480px) { .rg-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; } }
