:root {
    --neon-cyan: #00f3ff;
    --neon-pink: #ff00ff;
    --dark-bg: #0a0b10;
    --card-bg: rgba(20, 22, 35, 0.8);
    --text-main: #e0e0e0;
    --text-dim: #a0a0a0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: 'Rajdhani', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, #1a1b2e 0%, #0a0b10 100%);
    z-index: -1;
}

header {
    text-align: center;
    padding: 2rem 1rem 4rem 1rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto 2rem auto;
    gap: 1rem;
}

.auth-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#user-display {
    color: var(--neon-cyan);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
}

.neon-button-small {
    background: transparent;
    border: 1px solid var(--neon-pink);
    color: var(--neon-pink);
    padding: 0.3rem 0.8rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.neon-button-small:hover {
    background: var(--neon-pink);
    color: white;
    box-shadow: 0 0 10px var(--neon-pink);
}

.search-container input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 243, 255, 0.3);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    font-family: 'Rajdhani', sans-serif;
    border-radius: 20px;
    outline: none;
    transition: all 0.3s;
}

.search-container input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-dim);
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.7rem;
}

.lang-btn.active {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: 0 0 5px var(--neon-cyan);
}

.neon-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 3.5rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan), 0 0 20px rgba(0, 243, 255, 0.5);
    letter-spacing: 5px;
}

.subtitle {
    color: var(--neon-pink);
    font-weight: 700;
    letter-spacing: 2px;
}

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 243, 255, 0.2);
    padding: 2rem;
    border-radius: 4px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

h2 {
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--text-dim);
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

label {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

input[type="text"] {
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--neon-cyan);
    color: #fff;
    font-size: 1.5rem;
    padding: 0.5rem 0;
    outline: none;
}

.neon-button {
    background: transparent;
    border: 1px solid var(--neon-pink);
    color: var(--neon-pink);
    padding: 1rem 2rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.neon-button:hover {
    background: var(--neon-pink);
    color: #fff;
    box-shadow: 0 0 20px var(--neon-pink);
}

.btn-link {
    background: transparent;
    border: none;
    color: var(--neon-cyan);
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    margin-bottom: 2rem;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* Newspaper Layout */
.newspaper-container {
    background: #e4e2d5;
    /* Aged paper look */
    color: #1a1a1a;
    padding: 3rem;
    box-shadow: 10px 10px 0px var(--neon-cyan);
    font-family: serif;
    border: 2px solid #1a1a1a;
    margin-bottom: 4rem;
}

.newspaper-header {
    text-align: center;
    border-bottom: 4px double #1a1a1a;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.newspaper-meta {
    display: flex;
    justify-content: space-between;
    font-family: 'Rajdhani', sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    border-bottom: 1px solid #1a1a1a;
    margin-bottom: 1rem;
}

.newspaper-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    line-height: 1.1;
    text-transform: uppercase;
    margin: 1rem 0;
    color: #000;
}

.newspaper-subtitle {
    font-style: italic;
    font-size: 1.2rem;
    border-top: 1px solid #1a1a1a;
    padding-top: 0.5rem;
}

.newspaper-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.newspaper-body {
    font-size: 1.2rem;
    line-height: 1.5;
    text-align: justify;
    column-count: 2;
    column-gap: 2rem;
}

.side-col {
    border-left: 1px solid #1a1a1a;
    padding-left: 2rem;
}

.placeholder-ad {
    background: #000;
    color: #fff;
    padding: 1rem;
    font-size: 0.8rem;
    text-align: center;
    margin-bottom: 2rem;
}

.placeholder-img-news {
    border: 1px solid #1a1a1a;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.05);
}

.newspaper-footer {
    margin-top: 2rem;
    border-top: 4px double #1a1a1a;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.id-stamp {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.8rem;
    opacity: 0.5;
}

.vote-section-news {
    font-weight: bold;
}

/* Profiles & Stats */
.clickable-author {
    color: var(--neon-cyan);
    cursor: pointer;
    text-decoration: underline;
    transition: filter 0.3s;
}

.clickable-author:hover {
    filter: brightness(1.2);
}

.rank-badge {
    background: var(--neon-cyan);
    color: #000;
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-family: 'Orbitron', sans-serif;
    margin-top: 5px;
    font-weight: bold;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.stat-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    text-align: center;
    border: 1px solid rgba(0, 243, 255, 0.2);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-cyan);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.grid-mini {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Tags */
.newspaper-tags-container {
    margin: 0.5rem 0 1rem 0;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.newspaper-tag {
    font-family: 'Rajdhani', sans-serif;
    font-weight: bold;
    font-size: 0.8rem;
    color: #1a1a1a;
    border: 1px solid #1a1a1a;
    padding: 1px 6px;
    font-style: italic;
}

/* Comments Area */
.comments-section {
    margin-top: 3rem;
    border-top: 1px solid #1a1a1a;
    padding-top: 1.5rem;
}

.comments-section h4 {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.comment-item {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dotted #1a1a1a;
}

.comment-input-area {
    margin-top: 1rem;
    display: flex;
    gap: 10px;
}

.comment-input-area input {
    flex: 1;
    background: transparent;
    border: 1px solid #1a1a1a;
    padding: 5px 10px;
    font-family: serif;
    color: #1a1a1a;
    /* Fix visibility in light mode */
}

.comment-input-area button {
    background: #000;
    color: #fff;
    border: none;
    padding: 0 15px;
    cursor: pointer;
}

/* Night Edition Override */
body.night-edition .newspaper-container {
    background: #1c1c1c;
    color: #d4d4d4;
    border-color: #444;
    box-shadow: 10px 10px 0px var(--neon-pink);
}

body.night-edition .newspaper-title,
body.night-edition .newspaper-meta,
body.night-edition .newspaper-subtitle,
body.night-edition .newspaper-footer,
body.night-edition .side-col,
body.night-edition .newspaper-tag,
body.night-edition .comment-item,
body.night-edition .comments-section,
body.night-edition .comment-input-area input {
    color: #bbb;
    border-color: #444;
}

body.night-edition .placeholder-img-news {
    background: rgba(255, 255, 255, 0.05);
    border-color: #444;
}

body.night-edition .comment-input-area button {
    background: var(--neon-pink);
}

.theme-btn {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 5px;
}

.clickable-author {
    color: var(--neon-pink) !important;
}

.night-edition .clickable-author {
    color: var(--neon-cyan) !important;
}
}

.hidden {
    display: none;
}

.result-card {
    border-left: 4px solid var(--neon-cyan);
}

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.label {
    color: var(--neon-cyan);
    font-weight: bold;
}

.id-tag {
    color: var(--text-dim);
}

.media-placeholders {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
}

.placeholder-img,
.placeholder-audio {
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-dim);
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.section-title {
    text-align: center;
    color: var(--neon-pink);
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.search-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border-radius: 4px;
}

.search-container {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-container input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--neon-cyan);
    color: var(--text-main);
    padding: 0.5rem 1rem;
    font-family: 'Rajdhani', sans-serif;
    width: 100%;
}

.active-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.active-tag {
    background: var(--neon-cyan);
    color: #000;
    padding: 0.1rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 2px;
}

.view-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0.3rem 0.6rem;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.view-btn.active {
    background: var(--neon-cyan);
    color: #000;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-family: 'Orbitron', sans-serif;
    cursor: pointer;
    font-size: 0.9rem;
}

.filter-btn.active {
    color: var(--neon-cyan);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.mini-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s;
}

.mini-card:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 243, 255, 0.3);
}

.lang-tag {
    font-size: 0.6rem;
    background: rgba(0, 243, 255, 0.1);
    color: var(--neon-cyan);
    padding: 1px 4px;
    border: 1px solid var(--neon-cyan);
    border-radius: 2px;
}

.mini-card h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--neon-cyan);
}

.mini-card p {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
}

.vote-btn {
    background: rgba(255, 0, 255, 0.1);
    border: 1px solid var(--neon-pink);
    color: var(--neon-pink);
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
}

footer {
    text-align: center;
    padding: 4rem;
    color: var(--text-dim);
    font-size: 0.8rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    width: 90%;
    max-width: 400px;
    padding: 2.5rem;
    position: relative;
    border: 1px solid var(--neon-cyan);
    background: var(--card-bg);
}

.close-modal {
    position: absolute;
    right: 1.5rem;
    top: 1rem;
    font-size: 2rem;
    color: var(--text-dim);
    cursor: pointer;
}

.close-modal:hover {
    color: var(--neon-pink);
}

.modal h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--neon-cyan);
    letter-spacing: 2px;
}

.switch-auth {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.switch-auth a {
    color: var(--neon-cyan);
    text-decoration: none;
}

.divider {
    margin: 1.5rem 0;
    text-align: center;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.divider span {
    background: var(--dark-bg);
    padding: 0 1rem;
    position: relative;
    color: var(--text-dim);
    font-size: 0.8rem;
}

.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.google-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 15px var(--neon-cyan-low);
    transform: translateY(-2px);
}

.google-btn svg {
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
}

.small-text {
    font-size: 0.85rem;
    margin-top: -10px !important;
    margin-bottom: 20px !important;
    text-align: right;
}

.hidden {
    display: none !important;
}

/* Absurd Chaos Animations */
.chaos-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.chaos-item {
    position: absolute;
    left: -100px;
    font-size: 3rem;
    filter: drop-shadow(0 0 10px rgba(0, 243, 255, 0.5));
    animation: flyAcross var(--speed) linear infinite;
    animation-delay: calc(var(--id) * -5s);
    top: var(--top);
    opacity: 0.6;
}

@keyframes flyAcross {
    0% {
        transform: translate(0, 0) rotate(0deg);
        left: -100px;
    }

    25% {
        transform: translate(25vw, -50px) rotate(90deg);
    }

    50% {
        transform: translate(50vw, 50px) rotate(180deg);
    }

    75% {
        transform: translate(75vw, -50px) rotate(270deg);
    }

    100% {
        transform: translate(110vw, 0) rotate(360deg);
        left: 100%;
    }
}

/* Make icons pulse weirdly */
.chaos-item:nth-child(even) {
    animation-direction: alternate-reverse;
    filter: hue-rotate(90deg) brightness(1.5);
}

.chaos-item:nth-child(3n) {
    font-size: 5rem;
    animation-duration: 40s;
}

/* Add some glitch to the title */
.neon-text:hover {
    animation: glitch 0.3s cubic-bezier(.25, .46, .45, .94) both infinite;
}

@keyframes glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

/* Weird grid movement */
.mini-card {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s;
}

.mini-card:hover {
    transform: translateY(-10px) rotate(calc(var(--random-rotate, 2deg))) scale(1.05);
    z-index: 10;
}

footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-dim);
}

footer a {
    color: var(--neon-cyan);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.3s;
}

footer a:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 5px var(--neon-pink);
}

.neon-text-blue {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
}


footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-dim);
}

footer a {
    color: var(--neon-cyan);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.3s;
}

footer a:hover {
    color: var(--neon-pink);
    text-shadow: 0 0 5px var(--neon-pink);
}

.neon-text-blue {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
}


/* Action Buttons & Detail Actions */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.detail-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.detail-actions .neon-button-small {
    min-width: 180px;
}

@media (max-width: 600px) {
    .detail-actions {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .detail-actions .neon-button-small {
        width: 100%;
    }
}

/* Breaking News Overlay */
.breaking-news-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 11, 16, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
}

.breaking-news-overlay.hidden {
    display: none;
}

.breaking-news-content {
    animation: flash-bg 0.5s infinite alternate;
    padding: 2rem;
    border: 5px solid var(--neon-pink);
    border-radius: 10px;
}

@keyframes flash-bg {
    0% {
        box-shadow: 0 0 20px var(--neon-pink);
    }

    100% {
        box-shadow: 0 0 60px var(--neon-pink);
        border-color: var(--neon-cyan);
    }
}

.breaking-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 4rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 20px var(--neon-cyan);
    margin-bottom: 2rem;
    animation: shake 0.2s infinite;
}

@keyframes shake {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}

.countdown {
    font-family: 'Orbitron', sans-serif;
    font-size: 8rem;
    color: var(--neon-pink);
    text-shadow: 0 0 40px var(--neon-pink);
}

/* Spin In Animation for Newspaper */
.newspaper-container.spin-in {
    animation: newspaper-spin 1.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes newspaper-spin {
    0% {
        transform: scale(0) rotate(-720deg);
        opacity: 0;
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Flash Effect */
.flash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
}

.flash-overlay.active {
    animation: flash-camera 0.6s ease-out;
}

@keyframes flash-camera {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

/* Multiverse Static Glitch */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    background: #000;
    opacity: 0.8;
    pointer-events: none;
}

.glitch-overlay::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.glitch-overlay.active {
    animation: glitch-anim 0.2s infinite;
}

@keyframes glitch-anim {
    0% {
        transform: translate(0);
        text-shadow: -2px 0 red, 2px 0 blue;
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
        text-shadow: 2px 0 red, -2px 0 blue;
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

/* Confetti / Reality Shards */
.particle {
    position: fixed;
    pointer-events: none;
    z-index: 10001;
    width: 10px;
    height: 10px;
    background: var(--neon-cyan);
    opacity: 0;
}

.particle.shard {
    background: white;
    box-shadow: 0 0 10px var(--neon-cyan);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.particle.animate {
    animation: fly-out 1s ease-out forwards;
}

@keyframes fly-out {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* Battle System */
.battle-arena {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    padding: 2rem;
    min-height: 60vh;
}

.battle-card {
    flex: 1;
    max-width: 450px;
    background: #e4e2d5;
    color: #1a1a1a;
    padding: 2rem;
    border: 2px solid #1a1a1a;
    box-shadow: 10px 10px 0px var(--neon-cyan);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    font-family: serif;
}

.battle-card:hover {
    transform: scale(1.02) rotate(-1deg);
    box-shadow: 15px 15px 0px var(--neon-pink);
}

.battle-card h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 0.5rem;
}

.battle-vs {
    font-family: 'Orbitron', sans-serif;
    font-size: 3rem;
    color: var(--neon-pink);
    text-shadow: 0 0 20px var(--neon-pink);
    z-index: 10;
}

.battle-instruction {
    text-align: center;
    color: var(--neon-cyan);
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 2rem;
}

/* Burning Effect */
@keyframes burn-fade {
    0% {
        filter: grayscale(0) brightness(1) sepia(0);
        opacity: 1;
        transform: scale(1);
    }

    20% {
        filter: grayscale(0.5) brightness(1.5) sepia(0.5) hue-rotate(-20deg);
        transform: scale(1.05);
    }

    100% {
        filter: grayscale(1) brightness(0) sepia(1) hue-rotate(-50deg);
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
}

.burn-away {
    animation: burn-fade 1.2s forwards ease-in;
    pointer-events: none;
}

.battle-selected {
    border-color: var(--neon-pink) !important;
    box-shadow: 0 0 30px var(--neon-pink) !important;
    z-index: 5;
}

@media (max-width: 900px) {
    .battle-arena {
        flex-direction: column;
    }

    .battle-vs {
        margin: 1rem 0;
    }
}


/* Multiverse Static Glitch */
.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    background: #000;
    opacity: 0.8;
    pointer-events: none;
}

.glitch-overlay::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.glitch-overlay.active {
    animation: glitch-anim 0.2s infinite;
}

@keyframes glitch-anim {
    0% {
        transform: translate(0);
        text-shadow: -2px 0 red, 2px 0 blue;
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
        text-shadow: 2px 0 red, -2px 0 blue;
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

/* Confetti / Reality Shards */
.particle {
    position: fixed;
    pointer-events: none;
    z-index: 10001;
    width: 10px;
    height: 10px;
    background: var(--neon-cyan);
    opacity: 0;
}

.particle.shard {
    background: white;
    box-shadow: 0 0 10px var(--neon-cyan);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.particle.animate {
    animation: fly-out 1s ease-out forwards;
}

@keyframes fly-out {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(var(--tx), var(--ty)) scale(0) rotate(360deg);
        opacity: 0;
    }
}

/* List View Styles */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.list-item {
    background: var(--card-bg);
    border-left: 3px solid var(--neon-cyan);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    cursor: pointer;
    gap: 1.5rem;
}

.list-item:hover {
    background: rgba(0, 243, 255, 0.05);
    transform: translateX(5px);
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.list-item-meta {
    font-size: 0.7rem;
    color: var(--text-dim);
    display: flex;
    gap: 1rem;
}

.list-item-actions {
    display: flex;
    gap: 0.5rem;
}

.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-dim);
    font-style: italic;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.search-highlight {
    background: rgba(0, 243, 255, 0.4);
    color: #fff;
    padding: 0 2px;
    border-radius: 2px;
}

/* Trending Tags */
.trending-tags-container {
    padding: 0 1rem;
    margin-top: -1rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 1s;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.trending-tag {
    font-size: 0.75rem;
    color: var(--text-dim);
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
}

.trending-tag:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
    transform: scale(1.1);
}

.favorite-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
    padding: 2px 8px;
    filter: grayscale(1);
    opacity: 0.6;
}

.favorite-btn:hover {
    transform: scale(1.2);
    filter: grayscale(0);
    opacity: 1;
}

.favorite-btn.active {
    filter: grayscale(0);
    opacity: 1;
    color: #ff0055;
    text-shadow: 0 0 10px #ff0055;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* News Ticker */
.news-ticker-container {
    background: #000;
    border-bottom: 1px solid var(--neon-cyan);
    height: 30px;
    display: flex;
    overflow: hidden;
    position: relative;
    z-index: 100;
}

.ticker-label {
    background: var(--neon-cyan);
    color: #000;
    padding: 0 10px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 0.8rem;
    line-height: 30px;
    white-space: nowrap;
    z-index: 2;
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
    line-height: 30px;
}

.ticker {
    display: inline-block;
    white-space: nowrap;
    padding-right: 100%;
    animation: ticker 60s linear infinite;
    color: var(--neon-cyan);
    font-size: 0.9rem;
    font-family: 'Courier New', Courier, monospace;
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Style Selector */
.style-selector {
    margin-top: 15px;
    margin-bottom: 20px;
}

.style-selector label {
    font-size: 0.8rem;
    color: var(--text-dim);
    display: block;
    margin-bottom: 5px;
}

.style-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.style-opt {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    padding: 3px 8px;
    border: 1px solid rgba(0, 243, 255, 0.1);
    transition: all 0.3s;
}

.style-opt:hover {
    background: rgba(0, 243, 255, 0.1);
}

.style-opt input {
    display: none;
}

.style-opt input:checked+span {
    color: var(--neon-cyan);
    text-shadow: 0 0 5px var(--neon-cyan);
}

.btn-tiny {
    background: transparent;
    border: 1px solid var(--text-dim);
    color: var(--text-dim);
    padding: 0 5px;
    cursor: pointer;
}

/* Map View */
.map-view {
    margin-top: 20px;
    border: 1px solid var(--neon-cyan);
}

#map {
    background: #000;
}

.leaflet-container {
    background: #000 !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: #000 !important;
    color: var(--neon-cyan) !important;
    border: 1px solid var(--neon-cyan) !important;
    font-family: 'Rajdhani', sans-serif;
}

/* Space Exploration HUD */
.space-hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    pointer-events: none;
    font-family: 'Rajdhani', sans-serif;
    background: radial-gradient(circle, transparent 40%, rgba(0, 243, 255, 0.05) 100%);
}

.hud-frame {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 1px solid rgba(0, 243, 255, 0.1);
    pointer-events: none;
}

.hud-corners {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid var(--neon-cyan);
    pointer-events: none;
}

.hud-tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.hud-tr {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.hud-bl {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.hud-br {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

.hud-top-bar {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-bg);
    padding: 5px 20px;
    display: flex;
    gap: 30px;
    border: 1px solid var(--neon-cyan);
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.hud-side-bar {
    position: absolute;
    top: 100px;
    bottom: 100px;
    width: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.hud-side-bar.left {
    left: 0;
}

.hud-side-bar.right {
    right: 0;
    width: 120px;
}

.hud-meter {
    width: 10px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    border: 1px solid var(--neon-cyan);
}

.meter-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    transition: height 0.1s linear;
}

.hud-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin-top: 10px;
    font-size: 0.7rem;
    color: var(--neon-cyan);
}

.hud-notification {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 0, 255, 0.2);
    color: var(--neon-pink);
    padding: 10px 40px;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    border: 1px solid var(--neon-pink);
    animation: pulse 1s infinite alternate;
}

#exit-exploration {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #f00;
    color: #f00;
    cursor: pointer;
    pointer-events: auto;
}

#exit-exploration:hover {
    background: #f00;
    color: #fff;
}

@keyframes pulse {
    from {
        opacity: 0.6;
    }

    to {
        opacity: 1;
    }
}

.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 243, 255, 0.05) 50%);
    background-size: 100% 4px;
    pointer-events: none;
}

body.exploration-mode {
    cursor: crosshair;
}

body.exploration-mode main {
    filter: brightness(1.2) contrast(1.1);
}

/* Warp Speed Effect */
.warp-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9998;
    background: #000;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
}

.warp-container.active {
    opacity: 1;
}

.warp-star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    opacity: 0;
}

.warp-star.animate {
    animation: warp-animation var(--duration) linear infinite;
}

@keyframes warp-animation {
    0% {
        transform: translateZ(0) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    100% {
        transform: translateZ(1000px) scale(1);
        opacity: 0;
    }
}

.warp-container .warp-streak {
    position: absolute;
    width: 2px;
    height: 100px;
    background: linear-gradient(to top, rgba(255, 255, 255, 0), #fff);
    top: 50%;
    left: 50%;
    transform-origin: 50% 50%;
    opacity: 0;
}

.warp-container.active .warp-streak {
    animation: streak-animation 1s linear infinite;
}

.warp-container.active .warp-streak:nth-child(1) {
    --angle: 0deg;
    animation-delay: 0s;
}

.warp-container.active .warp-streak:nth-child(2) {
    --angle: 72deg;
    animation-delay: 0.2s;
}

.warp-container.active .warp-streak:nth-child(3) {
    --angle: 144deg;
    animation-delay: 0.4s;
}

.warp-container.active .warp-streak:nth-child(4) {
    --angle: 216deg;
    animation-delay: 0.6s;
}

.warp-container.active .warp-streak:nth-child(5) {
    --angle: 288deg;
    animation-delay: 0.8s;
}

@keyframes streak-animation {
    0% {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(0);
        height: 0;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-1000px);
        height: 400px;
        opacity: 0;
    }
}
/* --- MOBILE & TABLET OPTIMIZATIONS --- */
@media (max-width: 900px) {
    .newspaper-content {
        grid-template-columns: 1fr;
    }
    
    .newspaper-body {
        column-count: 1;
    }
    
    .side-col {
        border-left: none;
        border-top: 1px solid #1a1a1a;
        padding-left: 0;
        padding-top: 20px;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .neon-text {
        font-size: 2.2rem;
        letter-spacing: 2px;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .auth-box {
        flex-direction: column;
        width: 100%;
        gap: 0.8rem;
    }
    
    .user-actions {
        display: flex;
        gap: 0.5rem;
    }
    
    .search-container {
        width: 100%;
    }
    
    .search-container input {
        width: 100%;
    }

    .newspaper-container {
        padding: 1.5rem;
        box-shadow: 5px 5px 0px var(--neon-cyan);
    }
    
    .newspaper-title {
        font-size: 1.8rem;
    }
    
    .hud-top-bar {
        font-size: 0.6rem;
        gap: 10px;
        padding: 5px 10px;
        width: 90%;
        justify-content: center;
    }
    
    .hud-side-bar {
        display: none; /* Hide sidebars on mobile HUD to save space */
    }
    
    .hud-notification {
        font-size: 0.9rem;
        width: 85%;
        padding: 10px;
        bottom: 100px;
    }

    /* Stack filter buttons on mobile */
    .filter-group {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .neon-text {
        font-size: 1.8rem;
    }
    
    .newspaper-header h1 {
        font-size: 1.5rem;
    }
    
    .newspaper-meta {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .neon-button {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
}
