/* ==========================================================================
   PHANTOM SYNTAX - Landing Page Stylesheet
   Theme: Deep Charcoal, Neon Purple & Indigo Accents
   ========================================================================== */

@font-face {
  font-family: "Rubik 80s Fade";
  src: url("fonts/rubik-80s-fade-latin-400-normal.woff2") format("woff2"),
       url("fonts/rubik-80s-fade-latin-400-normal.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: block;
  font-stretch: normal;
}

/* --- Custom Properties (Design Tokens) --- */
:root {
    --bg-dark: #0a0a0c;
    --bg-charcoal: #121216;
    --card-bg: rgba(18, 18, 22, 0.65);
    --border-color: rgba(157, 78, 221, 0.2);
    --border-color-hover: rgba(157, 78, 221, 0.5);
    
    --text-primary: #f3f3f6;
    --text-secondary: #a0a0ba;
    --text-muted: #62627a;
    
    --accent-purple: #9d4edd;
    --accent-purple-glow: rgba(157, 78, 221, 0.5);
    --accent-indigo: #5a189a;
    --accent-pink: #ff007f;
    --accent-cyan: #00f0ff;
    
    --font-logo: 'Rubik 80s Fade';
    --font-header: 'Chakra Petch', sans-serif;
    --font-code: 'Fira Code', monospace;
    --font-body: 'Inter', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --glass-blur: blur(16px);
}

/* --- Reset & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-purple) var(--bg-dark);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Custom Scrollbar for Webkit */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-purple);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-pink);
}

/* --- Background Canvas & Overlay --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(90, 24, 154, 0.15) 0%, rgba(10, 10, 12, 0) 70%);
    z-index: 1;
    pointer-events: none;
}

/* --- Container & Layout --- */
.container {
    width: 100%;
    max-width: 1200px;
    min-height: calc(100vh - 60px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    z-index: 2;
    position: relative;
    gap: 3rem;
}

@media (max-width: 968px) {
    .container {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 4rem;
        padding-bottom: 4rem;
        gap: 2.5rem;
    }
}

/* --- Hero Card Styling --- */
.hero-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(90, 24, 154, 0.1);
    position: relative;
    transition: var(--transition-smooth);
}

.hero-card:hover {
    border-color: var(--border-color-hover);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 
                0 0 50px rgba(157, 78, 221, 0.15);
    transform: translateY(-4px);
}

/* --- Logo & Avatar Glow --- */
.logo-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--accent-purple-glow) 0%, rgba(157, 78, 221, 0) 70%);
    filter: blur(10px);
    z-index: 1;
    animation: pulseGlow 4s infinite ease-in-out;
}

.studio-logo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--accent-purple);
    z-index: 2;
    position: relative;
    animation: floatingAvatar 6s infinite ease-in-out;
    box-shadow: 0 0 25px rgba(157, 78, 221, 0.3);
    transition: var(--transition-smooth);
}

.hero-card:hover .studio-logo {
    box-shadow: 0 0 35px rgba(157, 78, 221, 0.6);
    border-color: var(--accent-cyan);
}

/* --- Glitch Name Styling --- */
.brand-title {
    margin-bottom: 1.2rem;
    user-select: none;
}

.glitch-text {
    font-family: var(--font-logo);
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 2px;
    color: var(--text-primary);
    text-transform: uppercase;
    position: relative;
}

.glitch-secondary {
    font-weight: 400;
    color: var(--text-secondary);
}

/* Glitch Animation Keyframes and pseudo-elements */
.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    clip: rect(0, 0, 0, 0); 
}

.glitch-text::before {
    left: 2px;
    text-shadow: -1px 0 var(--accent-cyan);
    animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -2px;
    text-shadow: -1px 0 var(--accent-pink);
    animation: glitch-anim-2 3.5s infinite linear alternate-reverse;
}

/* --- Subtitles & Tagline --- */
.tagline {
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
}

.standard-text {
    font-family: var(--font-code);
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
    text-align: left;
    align-items: flex-start;
}

.accent-text {
    color: var(--accent-purple);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(157, 78, 221, 0.4);
}

/* --- Social Icons --- */
.social-links {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 2.2rem;
}

.social-icon-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.social-icon-btn:hover {
    color: var(--text-primary);
    background: rgba(157, 78, 221, 0.15);
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(157, 78, 221, 0.3);
    transform: translateY(-2px);
}

#btn-x {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

#btn-x:hover {
    border-color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

#btn-instagram:hover {
    border-color: #E1306C;
    box-shadow: 0 0 15px rgba(225, 48, 108, 0.4);
    background: rgba(225, 48, 108, 0.15);
}

#btn-github:hover {
    border-color: #f0f6fc;
    box-shadow: 0 0 15px rgba(240, 246, 252, 0.2);
    background: rgba(240, 246, 252, 0.1);
}

#btn-youtube:hover {
    border-color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
    background: rgba(255, 0, 0, 0.1);
}

#btn-itch:hover {
    border-color: #fa5c5c;
    box-shadow: 0 0 15px rgba(250, 92, 92, 0.3);
    background: rgba(250, 92, 92, 0.1);
}

/* --- Toggle Button --- */
.toggle-feed-btn {
    background: transparent;
    border: 1px solid var(--accent-purple);
    color: var(--text-primary);
    font-family: var(--font-header);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.8rem 1.6rem;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: var(--transition-smooth);
    box-shadow: 0 0 10px rgba(157, 78, 221, 0.1);
}

.toggle-feed-btn:hover {
    background: var(--accent-purple);
    box-shadow: 0 0 20px rgba(157, 78, 221, 0.4);
    transform: scale(1.03);
}

.toggle-feed-btn i {
    font-size: 0.85rem;
}

/* --- Feed Drawer Section --- */
.feed-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.2rem;
    width: 100%;
    max-width: 600px;
    height: 520px;
    display: flex;
    flex-direction: column;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(90, 24, 154, 0.05);
    position: relative;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.4s ease, 
                visibility 0.4s;
    opacity: 1;
    transform: translateX(0);
}

.feed-section.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(30px);
    position: absolute;
    pointer-events: none;
}

@media (max-width: 968px) {
    .feed-section.hidden {
        transform: translateY(30px);
    }
}

.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 1rem;
}

.feed-header h2 {
    font-family: var(--font-header);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.feed-header h2 i {
    color: var(--accent-purple);
}

.close-feed-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    padding: 0.2rem;
}

.close-feed-btn:hover {
    color: var(--accent-pink);
    transform: rotate(90deg);
}

/* Feed Tabs */
.feed-tabs {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-family: var(--font-header);
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(157, 78, 221, 0.3);
}

.tab-btn.active {
    background: rgba(157, 78, 221, 0.12);
    border-color: var(--accent-purple);
    color: var(--text-primary);
    box-shadow: inset 0 0 10px rgba(157, 78, 221, 0.2);
}

.tab-icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
}

/* Feed Content Wrapper & List */
.feed-content-wrapper {
    flex: 1;
    overflow-y: auto;
    position: relative;
    padding-right: 0.4rem;
}

.feed-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Feed Item Card */
.feed-item {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 1.2rem;
    transition: var(--transition-smooth);
    animation: fadeInItem 0.4s ease forwards;
}

.feed-item:hover {
    background: rgba(157, 78, 221, 0.03);
    border-color: rgba(157, 78, 221, 0.2);
    transform: scale(1.01);
}

.feed-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.feed-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    font-family: var(--font-header);
}

.feed-item-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.feed-item-title a:hover {
    color: var(--accent-purple);
}

.feed-item-date {
    font-size: 0.75rem;
    font-family: var(--font-code);
    color: var(--text-muted);
    white-space: nowrap;
    margin-top: 0.2rem;
}

.feed-item-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loader */
.loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-family: var(--font-code);
    font-size: 0.85rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(157, 78, 221, 0.1);
    border-top: 3px solid var(--accent-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Error View */
.feed-error {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.feed-error i {
    font-size: 2rem;
    color: var(--accent-pink);
}

.retry-btn {
    background: transparent;
    border: 1px solid var(--accent-pink);
    color: var(--accent-pink);
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-header);
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.retry-btn:hover {
    background: var(--accent-pink);
    color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.4);
}

/* Helper Class */
.hidden {
    display: none !important;
}

/* --- Footer --- */
.footer {
    min-height: 60px;
    padding: 1rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.02);
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer p {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.status-checks {
    display: flex;
    gap: 1.5rem;
    font-family: var(--font-code);
    font-size: 0.7rem;
}

.status-indicator {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition-smooth);
}

.status-indicator:hover {
    color: var(--text-main);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    background-color: #22c55e;
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.6);
}

/* --- Privacy page adds --- */
.mt-2 {margin-top:.25rem}

.space-y-1>:not([hidden])~:not([hidden]) {
    --tw-space-y-reverse: 10;
    margin-top:calc(.25rem * calc(0.1 - var(--tw-space-y-reverse)));
    margin-bottom:calc(.25rem * var(--tw-space-y-reverse));
}

.flex {display:flex}

.gap-2 {gap:.5rem}

.select-none {
    -webkit-user-select:none;
    -moz-user-select:none;
    user-select:none
}

/* --- Animations & Keyframes --- */
@keyframes pulseGlow {
    0%, 100% {
        transform: scale(0.95);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.75;
    }
}

@keyframes floatingAvatar {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(2deg);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInItem {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glitch Animation Keyframes */
@keyframes glitch-anim-1 {
    0% {
        clip: rect(15px, 9999px, 66px, 0);
    }
    10% {
        clip: rect(34px, 9999px, 5px, 0);
    }
    20% {
        clip: rect(78px, 9999px, 92px, 0);
    }
    30% {
        clip: rect(12px, 9999px, 34px, 0);
    }
    40% {
        clip: rect(85px, 9999px, 45px, 0);
    }
    50% {
        clip: rect(3px, 9999px, 78px, 0);
    }
    60% {
        clip: rect(66px, 9999px, 12px, 0);
    }
    70% {
        clip: rect(98px, 9999px, 85px, 0);
    }
    80% {
        clip: rect(23px, 9999px, 56px, 0);
    }
    90% {
        clip: rect(45px, 9999px, 3px, 0);
    }
    100% {
        clip: rect(12px, 9999px, 89px, 0);
    }
}

@keyframes glitch-anim-2 {
    0% {
        clip: rect(89px, 9999px, 12px, 0);
    }
    10% {
        clip: rect(5px, 9999px, 45px, 0);
    }
    20% {
        clip: rect(92px, 9999px, 78px, 0);
    }
    30% {
        clip: rect(34px, 9999px, 23px, 0);
    }
    40% {
        clip: rect(45px, 9999px, 85px, 0);
    }
    50% {
        clip: rect(78px, 9999px, 12px, 0);
    }
    60% {
        clip: rect(12px, 9999px, 66px, 0);
    }
    70% {
        clip: rect(85px, 9999px, 98px, 0);
    }
    80% {
        clip: rect(56px, 9999px, 23px, 0);
    }
    90% {
        clip: rect(3px, 9999px, 45px, 0);
    }
    100% {
        clip: rect(66px, 9999px, 15px, 0);
    }
}
