/* laugheconomy.css - v1.0.25512 */
body {
    font-family: 'Comic Neue', cursive, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #e0e0e0;
    color: #000;
    line-height: 1.0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #fff;
    color: #000;
    padding: 15px 30px;
    border-bottom: 4px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.logo h1 a {
    color: #000;
    text-decoration: none;
    font-size: 2.8em;
    font-weight: 700;
    text-shadow: 1px 1px 0 #ccc;
}

.logo .tagline {
    font-size: 1em;
    font-weight: bold;
    color: #333;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    text-decoration: none;
    color: #000;
    font-weight: 700;
    padding: 5px 10px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 1.1em;
}

nav ul li a:hover,
nav ul li a:focus {
    color: #fff;
    background-color: #e63946;
    border-bottom: 3px solid #000;
    border-radius: 5px;
    transform: translateY(-2px);
}

main {
    flex-grow: 1;
    padding: 10px;
    max-width: 1100px;
    margin: 20px auto;
}

.content-section {
    margin-bottom: 30px;
    padding: 25px;
    border: 3px solid #000;
    border-radius: 10px;
    background-color: #fff;
    position: relative;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.7);
    overflow: hidden;
}

.patterned-bg {
    background-color: #f8f8f8;
    background-image: radial-gradient(#cccccc 1px, transparent 1px);
    background-size: 15px 15px;
}

.dark-bg {
    background-color: #333;
    color: #000;
    border-color: #fff;
    box-shadow: 5px 5px 0px rgba(255, 255, 255, 0.7);
}

.dark-bg h2, .dark-bg h3 {
    color: #fff;
    border-bottom-color: #fff;
}

.dark-bg a {
    color: #ffcc00;
}

.content-section h2 {
    font-size: 2.2em;
    font-weight: 700;
    border-bottom: 3px dashed #000;
    display: inline-block;
    margin-bottom: 25px;
    padding-bottom: 5px;
    color: #000;
}

.bubble {
    position: relative;
    background: #457b9d;
    color: #fff;
    border-radius: .6em;
    padding: 6px 12px;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 10px;
    display: inline-block;
    vertical-align: middle;
    border: 2px solid #000;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
    animation: bubble-pop 0.5s ease-in-out;
}

.bubble.red { background: #e63946; border-color: #a01d26; }
.bubble.green { background: #2a9d8f; border-color: #1a6a60; }
.bubble.blue { background: #1d3557; border-color: #0d1f3a; }
.bubble.yellow { background: #ffcc00; color: #000; border-color: #cca300; }

.bubble:after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 0;
    border: 0.5em solid transparent;
    border-right-color: #457b9d;
    border-left: 0;
    margin-top: -0.5em;
    margin-left: -0.5em;
}

.bubble.red:after { border-right-color: #e63946; }
.bubble.green:after { border-right-color: #2a9d8f; }
.bubble.blue:after { border-right-color: #1d3557; }
.bubble.yellow:after { border-right-color: #ffcc00; }

@keyframes bubble-pop {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 1.5s infinite ease-in-out;
}

.highlight-red { color: #e63946; font-weight: bold; text-shadow: 1px 1px #f0a0a6; }
.highlight-blue { color: #1d3557; font-weight: bold; text-shadow: 1px 1px #a0b0c7; }
.highlight-green { color: #2a9d8f; font-weight: bold; text-shadow: 1px 1px #a0d0c9; }
.highlight-yellow { color: #ffcc00; background-color: #333; padding: 0 5px; border-radius: 3px; font-weight: bold; }

.ticker-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.ticker-item {
    border: 3px solid #000;
    border-radius: 8px;
    padding: 15px 20px;
    text-align: center;
    min-width: 200px;
    background-color: #f0f0f0;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.6);
}

.ticker-item.btc-bg { background-color: #f7931a; color: #fff; border-color: #d07b10; }
.ticker-item.eth-bg { background-color: #627eea; color: #fff; border-color: #4a63c0; }
.ticker-item.cad-bg { background-color: #e63946; color: #fff; border-color: #a01d26; }

.ticker-item h3 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 1.3em;
    color: inherit;
    text-decoration: underline;
}

.ticker-item p {
    margin: 5px 0;
}

.ticker-item .price {
    font-size: 1.8em;
    font-weight: 700;
    color: inherit;
}

.ticker-item .change {
    font-size: 1em;
    font-weight: bold;
}

.change.positive { color: #0f9d58; }
.change.negative { color: #db4437; }

.chart-container {
    margin-bottom: 40px;
    border: 3px solid #222;
    border-radius: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    box-shadow: 5px 5px 0 #222;
}

.chart-container h3 {
    text-align: center;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.chart-placeholder {
    background-color: #eee;
    border: 2px dashed #aaa;
    padding: 40px 20px;
    text-align: center;
    font-style: italic;
    color: #555;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
}

.chart-placeholder.gauge-style {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 20px;
    min-height: 100px;
    max-width: 600px;
    margin: 0 auto;
}

.chart-placeholder.line-chart-style {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    min-height: 300px;
}

canvas {
    max-width: 100%;
    max-height: 300px;
}

#fearGreedChart {
    max-height: 80px;
}

.chart-commentary {
    text-align: center;
    margin-top: 10px;
}

.meme-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.trending-category {
    flex: 1;
    min-width: 300px;
    background: #fff;
    border: 3px solid #222;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 5px 5px 0 #222;
    margin-bottom: 20px;
}

.trending-category h3 {
    font-family: 'Comic Neue', sans-serif;
    font-size: 1.5em;
    color: #222;
    margin-bottom: 10px;
    text-align: center;
}

.trending-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.trending-details h4 {
    font-family: 'Comic Neue', sans-serif;
    font-size: 1.2em;
    margin: 0 0 5px;
    color: #222;
}

.trending-details p {
    margin: 2px 0;
    font-size: 0.9em;
    color: #555;
}

.trending-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.trending-link:hover {
    transform: scale(1.05);
}

.trending-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Comic Neue', sans-serif;
    color: #222;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #222;
    border-top-color: #ffcc00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.meme-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.meme-item {
    border: 3px solid #000;
    padding: 15px;
    text-align: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.6);
    position: relative;
}

.meme-item img {
    max-width: 100%;
    height: auto;
    border: 2px solid #000;
    margin-bottom: 10px;
    border-radius: 4px;
}

.meme-item.rarity-common { border-color: #ccc; }
.meme-item.rarity-rare { border-color: #1d3557; }
.meme-item.rarity-epic { border-color: #e63946; }
.meme-item.rarity-legendary { border-color: #ffcc00; }

/* Collection grouping styles */
.collection-group {
    margin-bottom: 40px;
}

.collection-header {
    font-size: 1.8em;
    font-weight: 700;
    color: #1d3557;
    background-color: #f0f0f0;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #000;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.6);
    margin-bottom: 20px;
    text-align: left;
    /* Debug: Ensure collection header is styled */
    outline: 1px dashed #ccc; /* Remove after testing */
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

@media (min-width: 1200px) {
    .collection-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
}

.ai-item {
    background-color: #444;
    border-left: 8px solid #ffcc00;
    padding: 20px;
    margin-bottom: 20px;
    font-family: monospace;
    border-radius: 5px;
    color: #eee;
}

.ai-item blockquote {
    margin: 10px 0;
    padding: 15px;
    background: #555;
    border-radius: 4px;
    border: 1px dashed #777;
    color: #fff;
}

.ai-item cite {
    display: block;
    text-align: right;
    font-style: normal;
    font-weight: bold;
    color: #ffcc00;
}

.news-item {
    border-bottom: 1px dotted #eee;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.bonus-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dotted #ccc;
}

#bonus .swiper-slide.content-box,
#bonus .content-box {
    font-family: 'Courier New', Courier, monospace;
    white-space: pre-wrap;
}

.bingo-placeholder {
    width: 200px;
    height: 100px;
    background: #eee;
    border: 2px dashed #aaa;
    text-align: center;
    line-height: 100px;
    color: #555;
    margin-top: 10px;
}

button {
    background-color: #e63946;
    color: #fff;
    border: 2px solid #000;
    padding: 10px 18px;
    font-family: 'Comic Neue', cursive, sans-serif;
    font-weight: 700;
    font-size: 1em;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.5);
}

button:hover {
    background-color: #d62828;
    transform: translateY(-1px);
    box-shadow: 3px 3px 0px rgba(0,0,0,0.6);
}

button:active {
    transform: translateY(1px);
    box-shadow: 1px 1px 0px rgba(0,0,0,0.6);
}

footer {
    background-color: #000;
    color: #ccc;
    text-align: center;
    padding: 20px 30px;
    margin-top: 40px;
    font-size: 0.9em;
    border-top: 5px solid #ffcc00;
}

footer p {
    margin: 8px 0;
}

footer .attribution {
    font-size: 0.8em;
    color: #aaa;
}

footer .attribution a {
    color: #fff;
    text-decoration: underline;
}

footer .attribution a:hover {
    color: #ffcc00;
}

#threejs-container {
    position: absolute;
    top: 10px;
    right: 200px;
    width: 80px;
    height: 80px;
    z-index: 10;
}

.games-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
}

.game-card {
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    background: #fff;
    border: 3px solid #222;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 5px 5px 0 #222;
    text-align: center;
    transition: transform 0.2s;
}

.game-card:hover {
    transform: translateY(-5px);
}

.game-card h3 {
    font-family: 'Comic Neue', sans-serif;
    font-size: 1.4em;
    color: #222;
    margin: 0 0 10px;
}

.game-preview {
    width: 100%;
    height: 150px;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 2px solid #222;
    background: #eee;
}

.game-card p {
    font-family: 'Comic Neue', sans-serif;
    font-size: 0.9em;
    color: #555;
    margin: 0 0 10px;
}

.game-link {
    display: inline-block;
    padding: 10px 20px;
    font-family: 'Comic Neue', sans-serif;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 10px;
    transition: background-color 0.2s;
}

.game-link:hover {
    background-color: #e6b800;
}

.loading {
    display: flex;
    align-items: center;
    gap: 5px;
}

.game-preview:hover {
    transform: scale(1.05);
    transition: transform 0.2s;
}

.game-preview-wrapper {
    position: relative;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    color: #ffcc00;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: 'Comic Neue', sans-serif;
    font-size: 1.2em;
    opacity: 0;
    transition: opacity 0.2s;
}

.game-preview-wrapper:hover .play-overlay {
    opacity: 1;
}

.swiper {
    width: 100%;
    max-width: 800px;
    margin: 20px auto;
}

.swiper-slide {
    background: #fff;
    padding: 20px;
    border: 2px solid #ff0000;
    border-radius: 10px;
    font-family: 'Comic Neue', cursive;
}

.swiper-button-next, .swiper-button-prev {
    color: #ff0000;
}

.playground-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.playground-input input {
    padding: 10px;
    border: 2px solid #ff0000;
    border-radius: 5px;
    font-family: 'Comic Neue', cursive;
    flex-grow: 1;
}

.playground-canvas {
    border: 2px solid #f7931a;
    background-color: #000000;
    width: 600px;
    height: 400px;
    margin: 20px auto;
    display: block;
}

.content-box {
    background: #fff;
    padding: 15px;
    border: 2px solid #ff0000;
    border-radius: 10px;
    font-family: 'Comic Neue', cursive;
}

#bonus .swiper-slide.content-box,
#bonus .content-box {
    font-family: 'Courier New', Courier, monospace !important;
    white-space: pre-wrap !important;
}

#ai-playground .content-box {
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    font-family: 'Comic Neue', cursive;
    font-size: 14px;
    line-height: 1.5;
    display: block;
    opacity: 1;
}

#game-canvas {
    border: 2px solid #f7931a;
    background-color: #000000;
}

canvas.game-canvas {
    width: 100% !important;
    height: 100% !important;
}

.cartoon-element {
    max-width: 150px;
    border: 2px solid #000;
    float: right;
    margin-left: 15px;
    border-radius: 5px;
}

.cartoon-element.small {
    max-width: 50px;
    border: none;
    float: none;
    vertical-align: middle;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: center;
    }
    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    nav ul li {
        margin: 5px 10px;
        width: auto;
    }
    .content-section {
        margin: 15px 10px;
        padding: 15px;
        box-shadow: 3px 3px 0px rgba(0,0,0,0.7);
    }
    .ticker-container {
        flex-direction: column;
        align-items: center;
    }
    .ticker-item {
        width: 80%;
    }
    #threejs-container {
        position: static;
        width: 80%;
        height: 100px;
        margin: 10px auto;
    }
    .cartoon-element {
        float: none;
        display: block;
        margin: 10px auto;
    }
}

.svg-display-box {
    min-height: 150px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 2px dashed #8A2BE2;
}

.svg-display-box img {
    max-width: 100%;
    max-height: 200px;
}

.ai-ticker-bg {
    background-color: #e0cffc;
    color: #333;
    border-color: #8A2BE2;
}

.ai-ticker-bg h3 {
    color: #333;
}

.ai-ticker-bg .price {
    color: #1d3557;
}

.ai-ticker-bg .change.positive {
    color: #2a9d8f;
}

.ai-ticker-bg .change.negative {
    color: #e63946;
}

.ai-content-generator {
    margin-top: 30px;
    padding: 20px;
    border: 2px dashed #8A2BE2;
    border RADIUS: 10px;
    background-color: #f9f5ff;
}

.ai-content-generator h3 {
    text-align: center;
    color: #8A2BE2;
    margin-bottom: 15px;
}

.ai-content-generator button {
    display: block;
    margin: 0 auto 15px auto;
}

.error-message {
    color: #e63946;
    font-weight: bold;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    background-color: #ffebee;
    border: 1px solid #e63946;
    border-radius: 5px;
}

.ai-chart-container h3 {
    text-align: center;
    color: #1d3557;
}

.bubble.aiPurple {
    background-color: #8A2BE2;
    border-color: #5d1d9b;
}

.bubble.aiPurple:after {
    border-right-color: #8A2BE2;
}

#game-canvas-container {
    width: 600px;
    height: 400px;
    margin: 20px auto;
    border: 2px solid #f7931a;
    background-color: #000000;
}

.chart-placeholder canvas, #ai-generated-chart-container canvas {
    max-width: 100%;
    height: auto !important;
}

#video-section {
    text-align: center;
    margin: 10px auto;
}

#threeJsVideo {
    width: 100%;
    max-width: 600px;
    height: auto;
    display: block;
    border-radius: 10px;
}

/* Optional, for hover effect */
.nft-admin-card img:hover {
    cursor: pointer;
    outline: 2px solid #f39c12;
}