/*
Theme Name: PetroffSpace
Description: Modernized cosmic fractal theme for PetroffSpace.
Author: Petroff
Version: 2.0
Text Domain: petroffspace
*/

/* -------------------------------------------------------------
 * 1. Modern Reset & Base
 * ----------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body#petroff {
    min-height: 100vh;
    background-color: #0d0f1a;
    color: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* -------------------------------------------------------------
 * 2. Background Fractal Canvas & Animations
 * ----------------------------------------------------------- */
canvas#c {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    display: block;
    pointer-events: auto;
    cursor: pointer;
}

body.hueRotate canvas#c,
canvas#c.hueRotate {
    -webkit-animation: petroff-hue-rotate 60s linear infinite !important;
    animation: petroff-hue-rotate 60s linear infinite !important;
    will-change: filter;
}

@-webkit-keyframes petroff-hue-rotate {
    0%   { -webkit-filter: hue-rotate(0deg); }
    100% { -webkit-filter: hue-rotate(360deg); }
}

@keyframes petroff-hue-rotate {
    0%   { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

/* -------------------------------------------------------------
 * 3. Controls / Hue Rotate Pill
 * ----------------------------------------------------------- */
div#controls {
    position: fixed;
    top: 16px;
    right: 18px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(14, 16, 26, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 6px 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    transition: all 0.25s ease;
}

div#controls:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
}

a.wish-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fef08a !important;
    text-decoration: none !important;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(254, 240, 138, 0.08);
    border: 1px solid rgba(254, 240, 138, 0.22);
    transition: all 0.25s ease;
    white-space: nowrap;
}

a.wish-link:hover {
    background: rgba(254, 240, 138, 0.2);
    border-color: rgba(254, 240, 138, 0.55);
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(254, 240, 138, 0.35);
    transform: translateY(-1px);
}

label.hueRotate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    user-select: none;
    padding: 3px 10px;
    border-radius: 9999px;
    border: 1.5px solid transparent;
    background: 
        linear-gradient(rgba(14, 16, 26, 0.88), rgba(14, 16, 26, 0.88)) padding-box,
        linear-gradient(90deg, #ff0055, #ff7700, #ffdd00, #00ff66, #00ffff, #0066ff, #aa00ff, #ff0055) border-box;
    transition: all 0.25s ease;
    white-space: nowrap;
}

label.hueRotate:hover {
    background: 
        linear-gradient(rgba(24, 28, 44, 0.95), rgba(24, 28, 44, 0.95)) padding-box,
        linear-gradient(90deg, #ff0055, #ff7700, #ffdd00, #00ff66, #00ffff, #0066ff, #aa00ff, #ff0055) border-box;
    box-shadow: 0 0 14px rgba(0, 255, 255, 0.35), 0 0 8px rgba(255, 0, 128, 0.3);
    transform: translateY(-1px);
}

label.hueRotate input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

span.control-switch {
    width: 28px;
    height: 16px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 9999px;
    display: inline-block;
    position: relative;
    transition: background 0.25s ease;
}

span.control-switch::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.25s ease, background 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

label.hueRotate input[type="checkbox"]:checked + span.control-switch {
    background: #38bdf8;
}

label.hueRotate input[type="checkbox"]:checked + span.control-switch::after {
    transform: translateX(12px);
    background: #ffffff;
}

span.hue-text {
    display: inline-block;
}

/* -------------------------------------------------------------
 * 4. Main Layout Wrapper & Glass Panels
 * ----------------------------------------------------------- */
#wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 28px 20px 60px 20px;
}

#header,
#menu,
#content,
#footer {
    background: rgba(14, 16, 26, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    margin-bottom: 22px;
}

/* -------------------------------------------------------------
 * 5. Header Bar
 * ----------------------------------------------------------- */
#header {
    padding: 34px 28px 28px 28px;
    text-align: center;
}

#header h1 {
    margin: 0 auto 12px auto;
    max-width: 880px;
    line-height: 1.1;
}

#header h1 a.site-fractal-logo {
    display: block;
    width: 100%;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#header h1 a.site-fractal-logo svg {
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(226, 232, 240, 0.45));
    transition: filter 0.3s ease, transform 0.3s ease;
}

#header h1 a.site-fractal-logo:hover svg {
    filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 32px rgba(203, 213, 225, 0.55));
    transform: scale(1.018);
}

#header h4 {
    color: rgba(203, 213, 225, 0.75);
    font-size: clamp(0.82rem, 1.8vw, 0.98rem);
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* -------------------------------------------------------------
 * 6. Section Titles (:Categories, :Artwork, :Contact)
 * ----------------------------------------------------------- */
h3 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.9);
    display: flex;
    align-items: center;
    gap: 4px;
}

h3 span {
    color: #38bdf8;
    font-weight: 900;
    margin-right: 4px;
}

/* -------------------------------------------------------------
 * 7. Categories Menu
 * ----------------------------------------------------------- */
#menu {
    padding: 22px 28px;
}

#menu h3 {
    margin-bottom: 14px;
}

#menu ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0;
    margin: 0;
}

#menu ul li {
    padding: 0;
    margin: 0;
}

#menu ul li a {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu ul li a:hover {
    background: rgba(56, 189, 248, 0.18);
    border-color: rgba(56, 189, 248, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}

/* -------------------------------------------------------------
 * 8. Content & Artwork Section
 * ----------------------------------------------------------- */
#content {
    padding: 32px 36px;
}

#content > h3 {
    margin-bottom: 30px;
}

div.content_artpack {
    width: 100%;
}

article.content_artpack_details {
    text-align: center;
    margin-bottom: 40px;
}

article.content_artpack_details header.post-header h1 {
    font-size: clamp(1.4rem, 2.8vw, 1.95rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    margin: 0 0 20px 0;
    text-transform: uppercase;
}

article.content_artpack_details header.post-header h1 a {
    color: #f8fafc;
    text-decoration: none;
    transition: color 0.25s ease, text-shadow 0.25s ease;
}

article.content_artpack_details header.post-header h1 a:hover {
    color: #38bdf8;
    text-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
}

/* Post Content Body */
div.post-content {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #cbd5e1;
    max-width: 860px;
    margin: 0 auto;
    text-align: left;
}

div.post-content p {
    margin-bottom: 1.25rem;
    text-align: center;
}

div.post-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 24px 0 16px 0;
    text-align: center;
}

/* CTA Buttons / Action Links inside posts */
div.post-content h2 a,
div.post-content a u,
div.post-content a.btn-cta,
div.post-content p.watch_link a,
div.post-content a.yearly_pack_link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 28px;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(168, 85, 247, 0.22));
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #ffffff !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.94rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    margin: 6px auto;
}

div.post-content h2 a:hover,
div.post-content a u:hover,
div.post-content a.btn-cta:hover,
div.post-content p.watch_link a:hover,
div.post-content a.yearly_pack_link:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.42), rgba(168, 85, 247, 0.42));
    border-color: rgba(56, 189, 248, 0.85);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(56, 189, 248, 0.4);
}

div.post-content a u {
    text-decoration: none;
}

div.post-content a {
    color: #38bdf8;
    text-decoration: none;
    transition: color 0.2s ease;
}

div.post-content a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Responsive Embeds (YouTube, iframes) */
div.post-content iframe {
    width: 100% !important;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    height: auto !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
    display: block;
    margin: 24px auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

div.post-content iframe:hover {
    box-shadow: 0 20px 44px rgba(56, 189, 248, 0.25);
}

/* Post Images */
div.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    display: inline-block;
    margin: 16px auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

div.post-content a:has(img):hover img,
div.post-content img:hover {
    transform: scale(1.015);
    box-shadow: 0 16px 40px rgba(120, 140, 255, 0.3);
}

/* Post Divider */
hr.post-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    margin: 44px auto;
    width: 85%;
}

/* Archive & Taxonomy Headers */
div.archive-header {
    text-align: center;
    margin-bottom: 34px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

div.archive-header h2.archive-title {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #f8fafc;
    text-transform: uppercase;
}

div.archive-description {
    margin-top: 8px;
    color: #94a3b8;
    font-size: 0.95rem;
}

/* -------------------------------------------------------------
 * 9. Pagination Navigation
 * ----------------------------------------------------------- */
nav.pagination-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 36px 0 12px 0;
    padding: 0 8px;
    flex-wrap: wrap;
    gap: 14px;
}

nav.pagination-nav .nav-previous a,
nav.pagination-nav .nav-next a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    transition: all 0.25s ease;
}

nav.pagination-nav .nav-previous a:hover,
nav.pagination-nav .nav-next a:hover {
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}

/* -------------------------------------------------------------
 * 10. Footer & Modern Social Links
 * ----------------------------------------------------------- */
#footer {
    padding: 28px 36px;
}

#footer h3 {
    margin-bottom: 20px;
}

div#contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

div.social-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

a.social-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 18px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

a.social-link svg {
    display: block;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

a.social-link:hover svg {
    transform: scale(1.12);
}

/* Brand specific accents on hover */
a.social-link-email:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

a.social-link-youtube:hover {
    background: rgba(239, 68, 68, 0.22);
    border-color: rgba(255, 0, 0, 0.6);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 0, 0, 0.35);
}

a.social-link-x:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.25);
}

a.social-link-github:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: rgba(168, 85, 247, 0.55);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.3);
}

div#copyright {
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* 404 & Not Found */
article.not-found {
    padding: 30px 10px;
}

article.not-found h1 {
    margin-bottom: 16px;
    font-size: 2rem;
}

article.not-found a.btn-home {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 24px;
    border-radius: 9999px;
    background: rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

/* -------------------------------------------------------------
 * 11. Responsive Media Queries
 * ----------------------------------------------------------- */
@media (max-width: 768px) {
    #wrapper {
        padding: 60px 12px 40px 12px;
    }

    #header,
    #menu,
    #content,
    #footer {
        padding: 24px 18px;
        border-radius: 16px;
        margin-bottom: 16px;
    }

    #header h1 {
        letter-spacing: 0.2em;
    }

    #header h4 {
        letter-spacing: 0.08em;
    }

    div#controls {
        top: 12px;
        right: 12px;
        padding: 5px 11px;
    }

    div.social-links-list {
        gap: 8px;
    }

    a.social-link {
        padding: 7px 14px;
        font-size: 0.85rem;
    }
}
