/* =========================================================
   Romazimus site stylesheet — optimized dark theme v2
   Public + admin styles / PHP 7.4 project
   ========================================================= */

:root {
    --bg: #070707;
    --bg-deep: #050505;
    --bg-section: #0b0b0d;
    --bg-card: #141416;
    --bg-form: #101217;

    --text: #f4f4f4;
    --text-soft: rgba(255,255,255,0.75);
    --text-muted: rgba(255,255,255,0.55);
    --text-dim: rgba(255,255,255,0.42);

    --line: rgba(255,255,255,0.09);
    --line-strong: rgba(255,255,255,0.16);

    --accent: #9f1f17;
    --accent-hover: #b8281f;
    --accent-bright: #ff6a55;

    --font-body: 'Inter', Arial, sans-serif;
    --font-logo: 'Bebas Neue', 'Oswald', Arial, sans-serif;
    --font-heading: 'Oswald', 'Bebas Neue', Arial, sans-serif;

    --container: 1120px;
    --radius-card: 24px;
    --shadow-card: 0 18px 42px rgba(0,0,0,0.32);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: min(var(--container), calc(100% - 32px)); margin: 0 auto; }
p { margin-top: 0; }

/* =========================================================
   Typography
   ========================================================= */

.bebas,
.brand-name,
.creator-title,
.footer-logo-text {
    font-family: var(--font-logo);
    text-transform: uppercase;
}

/* Natural Romazimus wordmark: same feeling in header and footer */
.brand-name,
.footer-logo-text {
    display: inline-block;
    font-size: 1.6rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    transition: color .15s ease, opacity .15s ease;
}

.brand:hover .brand-name,
.footer-logo-text:hover {
    color: #ffffff;
}

.section-head h1,
.section-head h2,
.page-head h1,
.single-post-title,
.card h3,
.track-card h3,
.tier-card h3,
.post-card h3 {
    font-family: var(--font-heading);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.055em;
    color: #ffffff;
    margin-top: 0;
}

.section-head h1,
.section-head h2,
.page-head h1,
.single-post-title {
    display: inline-block;
    transform: scaleX(0.92);
    transform-origin: left center;
    font-size: clamp(2rem, 2.5vw, 3rem);
    line-height: 1.14;
    margin-bottom: 10px;
}

.card h3,
.track-card h3,
.tier-card h3,
.post-card h3 {
    font-size: 1.55rem;
    line-height: 1.18;
    margin-bottom: 12px;
}

.card h3 a,
.card h3 a:visited,
.card h3 a:hover,
.track-card h3 a,
.track-card h3 a:visited,
.track-card h3 a:hover,
.tier-card h3 a,
.tier-card h3 a:visited,
.tier-card h3 a:hover,
.post-card h3 a,
.post-card h3 a:visited,
.post-card h3 a:hover {
    color: #ffffff;
    text-decoration: none;
}

.card h3 a:hover,
.post-card h3 a:hover {
    opacity: 0.82;
}

.meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.text-link,
.card a.text-link {
    color: var(--accent-bright);
    font-weight: 700;
}

.text-link:hover,
.card a.text-link:hover {
    color: #ffffff;
}

/* =========================================================
   Header
   ========================================================= */

.site-header,
.admin-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg-deep);
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.header-inner,
.admin-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #ffffff;
    white-space: nowrap;
}

.brand-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
    background: #b9b9b9;
    border: 4px solid #b9b9b9;
    padding: 1px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f04f33, #c51f1f);
    color: #fff;
    box-shadow: 0 8px 24px rgba(240,79,51,.35);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.main-nav a {
    color: rgba(255,255,255,0.82);
    font-weight: 700;
    padding: 24px 0 20px;
    border-bottom: 3px solid transparent;
    transition: color .15s ease, border-color .15s ease, background .15s ease;
}

.main-nav a.active,
.main-nav a:hover {
    color: #ffffff;
    border-bottom-color: var(--accent);
}

.main-nav .nav-support-link {
    margin-left: 10px;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    border-bottom: 0;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.1;
}

.main-nav .nav-support-link:hover {
    background: var(--accent-hover);
    color: #ffffff;
    border-bottom: 0;
}

.main-nav .nav-support-link.active { border-bottom: 0; }

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}
.lang-switch a,
.lang-switch span { color: #ffffff; }
.lang-switch a { opacity: 0.55; }
.lang-switch a.active,
.lang-switch a:hover { opacity: 1; }

/* =========================================================
   Creator hero / homepage
   ========================================================= */

.creator-hero {
    min-height: 620px;
    background-color: #080808;
    background-size: cover;
    background-position: center;
    position: relative;
}

.creator-hero-overlay {
    min-height: 620px;
    background:
        linear-gradient(90deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.58) 38%, rgba(0,0,0,0.22) 100%),
        linear-gradient(180deg, rgba(0,0,0,0.25), rgba(0,0,0,0.72));
}

.creator-hero-inner {
    min-height: 620px;
    display: flex;
    align-items: center;
}

.creator-profile {
    max-width: 760px;
    color: #ffffff;
    padding: 64px 0;
}

.creator-title {
    margin: 0 0 22px;
    font-size: clamp(3.8rem, 7.8vw, 5.8rem);
    font-weight: 400;
    letter-spacing: 0.08em;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 8px 28px rgba(0,0,0,0.55);
}

.creator-image-box {
    width: 400px;
    max-width: 100%;
    margin: 0 0 26px;
    border-radius: 0;
    border: 0;
    border-left: 4px solid rgba(255,255,255,0.35);
    overflow: hidden;
    background: transparent;
    box-shadow: 0 18px 44px rgba(0,0,0,0.25);
}

.creator-image {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0.42;
}

.creator-post-count {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.72);
    margin-bottom: 10px;
}

.creator-description {
    max-width: 760px;
    font-size: clamp(1.05rem, 2vw, 1.22rem);
    color: rgba(255,255,255,0.94);
    margin: 0 0 22px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

/* Old hero fallback, if any old template still uses it */
.hero {
    min-height: 72vh;
    background:
        linear-gradient(90deg, rgba(13,14,16,.85), rgba(13,14,16,.55)),
        radial-gradient(circle at 75% 20%, rgba(255,155,92,.18), transparent 28%),
        radial-gradient(circle at 15% 35%, rgba(255,255,255,.05), transparent 24%),
        linear-gradient(180deg, #433027 0%, #17181c 68%);
    background-size: cover;
    background-position: center;
    display: grid;
    align-items: center;
}
.hero-inner { padding: 72px 0; }
.hero-content { max-width: 760px; }
.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(2.7rem, 6vw, 5.5rem);
    line-height: .95;
}
.hero-text {
    font-size: clamp(1rem, 2vw, 1.35rem);
    color: rgba(255,255,255,.9);
    max-width: 760px;
}

/* =========================================================
   Buttons
   ========================================================= */

.btn {
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, opacity .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: #ffffff; color: #080808; }
.btn-secondary {
    background: var(--accent);
    color: #ffffff;
    border: 1px solid var(--accent);
}
.btn-secondary:hover { background: var(--accent-hover); }
.btn-block { width: 100%; }

/* =========================================================
   Public sections and cards
   ========================================================= */

.section {
    padding: 58px 0;
    border-top: 1px solid rgba(255,255,255,0.07);
}
.section-light,
.section-soft,
.section-dark,
.section-accent {
    background: var(--bg-section);
    color: var(--text);
}

.section-head { margin-bottom: 24px; }
.section-head p,
.page-head p {
    color: rgba(255,255,255,0.72);
    max-width: 820px;
}
.section-head-split {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cards-grid,
.music-grid,
.tiers-grid,
.stats-grid,
.admin-links-grid {
    display: grid;
    gap: 20px;
}
.cards-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.music-grid { grid-template-columns: 1fr; }
.tiers-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin: 28px 0; }
.admin-links-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card,
.track-card,
.tier-card,
.about-box,
.admin-card,
.stat-card,
.admin-tile {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}
.card,
.track-card,
.tier-card { overflow: hidden; }
.card-body,
.tier-card,
.track-card,
.about-box,
.admin-card,
.stat-card,
.admin-tile { padding: 22px; }

.card p,
.track-card p,
.tier-card p {
    color: var(--text-soft);
}

.card-cover,
.post-cover {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.post-cover {
    opacity: 0.88;
    transition: opacity .15s ease, transform .15s ease;
}
.post-cover:hover {
    opacity: 1;
    transform: scale(1.015);
}

.track-card {
    max-width: 960px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.track-top {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}
.track-cover {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 16px;
}
.track-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6e42, #55261f);
    font-size: 2rem;
}

.tier-price {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-bright);
    margin-bottom: 8px;
}
.tier-price span {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.62);
}
.tier-members {
    margin-top: -4px;
    margin-bottom: 18px;
    font-size: 0.92rem;
    color: rgba(255,255,255,0.55);
}

/* Music page: one wide card per track */
.music-page .music-grid {
    grid-template-columns: 1fr;
    gap: 24px;
}
.music-page .track-card { padding: 28px; }
.music-page .track-top {
    grid-template-columns: 160px 1fr;
    gap: 28px;
}
.music-page .track-cover {
    width: 160px;
    height: 160px;
    border-radius: 12px;
}
.music-page .track-player { margin-top: 24px; }

.track-card:target {
    border-color: rgba(184,40,31,0.95);
    box-shadow:
        0 0 0 1px rgba(184,40,31,0.65),
        0 18px 42px rgba(0,0,0,0.45);
}

/* Posts page */
.posts-page .section-head p { max-width: 720px; }
.posts-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.post-card { overflow: hidden; }

/* =========================================================
   Native audio player
   ========================================================= */

.track-player,
audio.track-player {
    width: 100%;
    margin-top: 14px;
    background: #202020;
    color-scheme: dark;
    accent-color: var(--accent-hover);
    border-radius: 999px;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.08),
        0 8px 24px rgba(0,0,0,0.35);
}

audio.track-player::-webkit-media-controls-enclosure,
audio.track-player::-webkit-media-controls-panel {
    background-color: #202020;
    border-radius: 999px;
}

audio.track-player::-webkit-media-controls-play-button {
    filter: invert(1) brightness(2.4) contrast(1.4);
    opacity: 1;
}

audio.track-player::-webkit-media-controls-mute-button {
    filter: invert(1) brightness(2.2) contrast(1.3);
    opacity: 1;
}

audio.track-player::-webkit-media-controls-current-time-display,
audio.track-player::-webkit-media-controls-time-remaining-display {
    color: #ffffff;
    opacity: 1;
}

audio.track-player::-webkit-media-controls-timeline {
    filter: brightness(1.25) contrast(1.25);
}

/* =========================================================
   Article pages
   ========================================================= */

.page-head {
    padding: 56px 0 20px;
    background: linear-gradient(180deg, #17191f, #101114);
}

.article-wrap,
.admin-section .narrow,
.narrow {
    max-width: 860px;
}

.article-cover {
    border-radius: 24px;
    margin-bottom: 22px;
}

.article-content {
    font-size: 1.06rem;
    color: rgba(255,255,255,.9);
    white-space: normal;
}

.single-post-page {
    background: var(--bg-section);
    color: var(--text);
}

.single-post-meta {
    margin-bottom: 14px;
    color: rgba(255,255,255,0.52);
    font-size: 0.92rem;
}

.single-post-title {
    margin: 0 0 24px;
}

.single-post-cover {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    margin: 0 0 32px;
    border-radius: 0;
    border-left: 4px solid rgba(255,255,255,0.35);
    opacity: 0.88;
    box-shadow: 0 18px 44px rgba(0,0,0,0.32);
}

.single-post-content {
    font-size: 1.08rem;
    line-height: 1.75;
    color: rgba(255,255,255,0.82);
}

.single-post-content p { margin-top: 0; }

.single-post-content a.text-link {
    display: inline-flex;
    align-items: center;
    margin: 14px 0;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.single-post-content a.text-link:hover {
    background: var(--accent-hover);
    color: #ffffff;
}

.single-post-back { margin-top: 36px; }

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
    background: var(--bg-deep);
    color: rgba(255,255,255,0.62);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 28px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    color: rgba(255,255,255,0.72);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
}

.footer-links a,
.footer-links a:visited {
    color: rgba(255,255,255,0.72);
    transition: color 0.15s ease;
}

.footer-links a:hover,
.footer-links a:focus {
    color: #ff3b2f;
}

.footer-copyright {
    display: block;
    margin-top: 4px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.62);
}

.footer-tagline {
    display: block;
    margin-top: 4px;
    font-size: 0.78rem;
    line-height: 1.35;
    color: rgba(255,255,255,0.52);
    max-width: 620px;
}

.footer-youtube-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: 18px;
    color: rgba(255,255,255,0.72);
    font-weight: 700;
    white-space: nowrap;
}

.footer-youtube-link:hover { color: #ff3b2f; }
.footer-youtube-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* =========================================================
   Admin / forms / tables
   ========================================================= */

.admin-body { background: #111318; }
.admin-main { padding: 36px 0 70px; }
.admin-login-wrap {
    min-height: calc(100vh - 74px);
    display: grid;
    place-items: center;
    padding: 28px 16px;
}
.admin-card { width: min(460px, 100%); }

.flash { padding: 12px 0; }
.flash-success {
    background: rgba(24, 129, 81, .2);
    border-bottom: 1px solid rgba(64, 201, 130, .22);
}
.flash-error {
    background: rgba(155, 34, 34, .2);
    border-bottom: 1px solid rgba(255, 95, 95, .22);
}

.form { display: grid; gap: 18px; }
.form label { display: grid; gap: 8px; }
.form span { font-weight: 700; }
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form input[type="number"],
.form input[type="file"],
.form textarea {
    width: 100%;
    background: var(--bg-form);
    color: #fff;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    padding: 14px 16px;
    font: inherit;
}
.form textarea { resize: vertical; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.checkbox {
    display: flex !important;
    align-items: center;
    gap: 10px;
}
.checkbox input { width: auto; }
.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.preview-image {
    width: min(280px, 100%);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.08);
}
.hint { color: rgba(255,255,255,.65); font-size: .95rem; }

.table-wrap {
    overflow: auto;
    background: #171a20;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}
.admin-table th,
.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    text-align: left;
}
.admin-table th {
    color: rgba(255,255,255,.7);
    font-size: .95rem;
}
.actions {
    display: flex;
    gap: 12px;
    align-items: center;
}
.link-button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #ffb08f;
    font: inherit;
}
.link-button.danger { color: #ff7d7d; }
.stat-value {
    font-size: 2.6rem;
    font-weight: 900;
}
.stat-label { color: rgba(255,255,255,.66); }
.admin-tile {
    display: block;
    font-weight: 800;
    min-height: 110px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
    .header-inner,
    .admin-header-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px 0;
    }

    .main-nav a { padding: 8px 0; }

    .creator-hero,
    .creator-hero-overlay,
    .creator-hero-inner { min-height: auto; }

    .creator-profile { padding: 42px 0 56px; }
    .creator-title { font-size: clamp(3.4rem, 14vw, 5.6rem); }
    .creator-image-box { width: 360px; }
}

@media (max-width: 720px) {
    .section { padding: 52px 0; }

    .track-top,
    .music-page .track-top {
        grid-template-columns: 1fr;
    }

    .track-cover,
    .music-page .track-cover {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .creator-image-box { width: 100%; }
    .creator-description { font-size: 1.02rem; }

    .footer-links {
        flex-wrap: wrap;
    }

    .footer-youtube-link {
        margin-left: 0;
    }
}

.section-more {
    margin-top: 26px;
    text-align: right;
}

.section-more .text-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.82);
}

.section-more .text-link:hover {
    background: var(--accent);
    color: #ffffff;
}