@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --neon-green: #00ff41;
    --neon-pink: #ff00ff;
    --neon-blue: #00f0ff;
    --neon-purple: #9900ff;
    --neon-yellow: #ffff00;
    --dark-bg: #000000;
    --card-bg: #080c15;
    --text-color: #ffffff;
    --success-color: #00ff41;
    --danger-color: #ff073a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Orbitron', sans-serif;
}

body {
    background-color: var(--dark-bg) !important;
    color: var(--text-color);
    min-height: 100vh;
    padding-bottom: 80px;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

.laser-beam {
    position: absolute;
    width: 2px;
    background: var(--neon-pink);
    top: 0;
    bottom: 0;
    left: 20%;
    box-shadow: 0 0 10px 2px var(--neon-pink);
    opacity: 0.3;
    animation: laser-move 20s infinite linear;
    z-index: -1;
    will-change: transform;
    transform: translateZ(0);
}

.laser-beam:nth-child(2) {
    left: 40%;
    background: var(--neon-blue);
    box-shadow: 0 0 10px 2px var(--neon-blue);
    animation-duration: 15s;
    animation-delay: -5s;
}

.laser-beam:nth-child(3) {
    left: 70%;
    background: var(--neon-green);
    box-shadow: 0 0 10px 2px var(--neon-green);
    animation-duration: 25s;
    animation-delay: -12s;
}

@keyframes laser-move {
    0% { transform: translateX(-50px) rotate(20deg); }
    100% { transform: translateX(50px) rotate(20deg); }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.logo {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(to right, var(--neon-green), var(--neon-pink), var(--neon-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    font-family: 'Press Start 2P', cursive;
    transform: skew(-5deg);
    white-space: nowrap;
}

.logo::after {
    content: "💎🙌";
    -webkit-text-fill-color: initial;
    margin-left: 10px;
}

@keyframes floating {
    0% { transform: translateY(0px) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(-5deg); }
    100% { transform: translateY(0px) rotate(-5deg); }
}

.card {
    background: rgba(8, 12, 21, 1) !important;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    contain: content;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--neon-blue);
    text-shadow: 0 0 5px var(--neon-blue);
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ========== FORM LAYOUT IMPROVEMENTS ========== */
/* For desktop browsers, reorganize the form layout */
@media (min-width: 1024px) {
    /* Two-row layout with specific grid areas */
    .selection-form {
        display: grid;
        grid-template-areas: 
            "coin shitcoin"
            "direction percentage";
        grid-template-columns: 1fr 1fr;
        grid-gap: 25px;
    }
    
    /* Assign grid areas to form elements */
    .selection-form .form-group:nth-child(1) {
        grid-area: coin;
    }
    
    .selection-form .form-group:nth-child(2) {
        grid-area: shitcoin;
    }
    
    .selection-form .form-group:nth-child(3) {
        grid-area: direction;
    }
    
    .selection-form .form-group:nth-child(4) {
        grid-area: percentage;
    }
}

.selection-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 25px;
    margin-bottom: 30px;
    align-items: start;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--neon-green);
    text-shadow: 0 0 3px var(--neon-green);
    font-size: 1.2rem;
    letter-spacing: 1px;
    height: 25px;
}

select, input {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid var(--neon-blue);
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--text-color);
    font-size: 1rem;
    appearance: none;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
}

select:focus, input:focus {
    outline: none;
    border-color: var(--neon-pink);
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300f0ff' width='18px' height='18px'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    cursor: pointer;
    color: white;
}

select option {
    background-color: #080c15;
    color: white;
    padding: 15px;
}

/* ========== PERCENTAGE BUTTONS IMPROVEMENTS ========== */
.percentage-presets-container {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* For wider screens, center the percentage buttons */
@media (min-width: 1200px) {
    .percentage-buttons {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
        max-width: 420px;
        margin: 0 auto;
    }
    
    .percentage-button {
        flex: 0 0 calc(33.333% - 10px);
        max-width: 100px;
        min-width: 80px;
    }
    
    .percentage-display {
        max-width: 200px;
        margin: 15px auto 0;
        padding: 10px;
        border-radius: 10px;
        background-color: rgba(0, 0, 0, 0.3);
        border: 1px solid transparent;
    }
}

/* Default grid layout for other sizes */
.percentage-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
}

.percentage-button {
    padding: 15px 10px;
    background-color: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--neon-blue);
    border-radius: 8px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.percentage-button.active {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.6);
    color: white;
    border-color: transparent;
}

.percentage-button.up {
    border-color: var(--neon-green);
}

.percentage-button.up.active {
    background: linear-gradient(45deg, var(--neon-green), var(--neon-blue));
}

.percentage-button.down {
    border-color: var(--danger-color);
}

.percentage-button.down.active {
    background: linear-gradient(45deg, var(--danger-color), var(--neon-purple));
}

.percentage-display {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-top: 15px;
    text-shadow: 0 0 10px currentColor;
}

.percentage-display.up {
    color: var(--success-color);
    text-shadow: 0 0 10px var(--success-color);
}

.percentage-display.down {
    color: var(--danger-color);
    text-shadow: 0 0 10px var(--danger-color);
}

/* ========== VISUALIZATION BUTTON ========== */
.visualize-btn-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
}

button#visualize-btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    padding: 18px;
    font-size: 1.3rem;
    text-align: center;
    justify-content: center;
    border-radius: 12px;
    margin-top: 10px;
    background: linear-gradient(45deg, var(--neon-green), var(--neon-blue));
    color: #000;
    font-weight: 900;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.7);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 240, 255, 0.8);
}

button:active {
    transform: translateY(0) scale(0.98);
}

/* ========== CHART SECTION FIXES ========== */
#result-section {
    width: 100% !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.chart-container {
    position: relative;
    height: 450px !important;
    width: 100% !important;
    margin-bottom: 20px;
    overflow: hidden;
    box-sizing: border-box;
}

#chart-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

#result-section .card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

#price-chart {
    width: 100% !important;
    height: 100% !important;
}

.info-box {
    width: 100%;
    max-width: 100%;
    text-align: left;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.chart-title {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(to right, var(--neon-green), var(--neon-yellow));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.price-info {
    display: flex;
    gap: 30px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.price-item {
    flex: 1;
    min-width: 180px;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    text-align: center;
}

.price-label {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price-value {
    font-size: 2.2rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.up {
    color: var(--success-color);
    text-shadow: 0 0 10px var(--success-color);
}

.down {
    color: var(--danger-color);
    text-shadow: 0 0 10px var(--danger-color);
}

.info-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--neon-yellow);
    text-shadow: 0 0 5px var(--neon-yellow);
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ========== LOADING INDICATOR ========== */
.hidden {
    display: none !important;
}

.loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 400px;
    font-size: 1.5rem;
    color: var(--neon-blue);
    text-shadow: 0 0 10px var(--neon-blue);
    gap: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

.loader {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 5px solid transparent;
    border-top-color: var(--neon-pink);
    border-bottom-color: var(--neon-green);
    animation: spin 1s linear infinite;
    box-shadow: 
        0 0 10px var(--neon-pink),
        0 0 20px var(--neon-green);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rocket-icon {
    display: inline-block;
    animation: launch 2s infinite;
    transform-origin: bottom center;
    will-change: transform;
    transform: translateZ(0);
}

@keyframes launch {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

/* ========== SEARCH DROPDOWN ========== */
.coin-search {
    position: relative;
    margin-bottom: 30px;
}

.search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background-color: rgba(8, 12, 21, 0.95);
    border: 2px solid var(--neon-blue);
    border-radius: 10px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    margin-top: 2px;
    display: none;
    box-shadow: 0 10px 25px rgba(0, 240, 255, 0.2);
    width: 100%;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    transition: all 0.2s ease;
}

.search-result-item:hover {
    background-color: rgba(0, 240, 255, 0.1);
}

/* ========== SHARE BUTTONS ========== */
.share-buttons-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 100;
    width: 140px;
}

.share-button {
    width: 140px;
    height: 60px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    background: linear-gradient(135deg, var(--neon-pink), var(--neon-purple));
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
    color: white;
    border: none;
    animation: pulse-share 2s infinite;
    gap: 10px;
    font-weight: 700;
    position: relative;
}

@keyframes pulse-share {
    0% {
        box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 0, 255, 0.8);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
        transform: scale(1);
    }
}

.news-button {
    background: linear-gradient(135deg, var(--neon-green), var(--neon-blue));
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
    margin-top: 15px;
    animation: pulse-news 2s infinite;
}

@keyframes pulse-news {
    0% {
        box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 240, 255, 0.8);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
        transform: scale(1);
    }
}

.share-button:hover {
    transform: translateY(-5px) scale(1.1);
}

.centered-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    width: 100%;
}

.action-button {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid;
    border-radius: 50px;
    padding: 12px 22px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    animation: badgePulse 3s infinite;
}

.action-button:nth-child(1) {
    border-color: var(--neon-green);
    color: var(--neon-green);
    animation-delay: 0s;
}

.action-button:nth-child(2) {
    border-color: var(--neon-pink);
    color: var(--neon-pink);
    animation-delay: 0.5s;
}

.action-button:nth-child(3) {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    animation-delay: 1s;
}

.action-button:nth-child(4) {
    border-color: var(--neon-yellow);
    color: var(--neon-yellow);
    animation-delay: 1.5s;
}

.action-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px currentColor;
}

/* Hide the floating share-buttons-container */
.share-buttons-container {
    display: none;
}

/* Responsive styles for action buttons */
@media (max-width: 768px) {
    .centered-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .action-button {
        font-size: 0.8rem;
        padding: 10px 15px;
        min-width: 140px;
    }
}

@media (max-width: 500px) {
    .centered-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .action-button {
        width: 100%;
        min-width: unset;
    }
}

/* Chart Title Wrapping */
.chart-title {
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(to right, var(--neon-green), var(--neon-yellow));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
    word-wrap: break-word;
    max-width: 100%;
    display: inline-block;
}

@media (max-width: 768px) {
    .chart-title {
        font-size: 1.5rem;
        line-height: 1.3;
        max-height: 2.6em; /* Allow for 2 lines */
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}
/* ========== DECORATIVE ELEMENTS ========== */
.moon-img {
    position: absolute;
    width: 100px;
    height: 100px;
    top: -50px;
    right: -20px;
    opacity: 0.7;
    animation: floating 8s infinite ease-in-out;
    will-change: transform;
    transform: translateZ(0);
}

.diamond-hands {
    position: fixed;
    bottom: -100px;
    left: 0;
    opacity: 0;
    animation: diamondHandsAnimation 8s ease infinite;
    pointer-events: none;
    z-index: 0;
    font-size: 100px;
}

@keyframes diamondHandsAnimation {
    0% {
        bottom: -100px;
        left: 10%;
        transform: rotate(0deg);
        opacity: 0;
    }
    10% {
        bottom: 100px;
        opacity: 1;
    }
    50% {
        bottom: 40%;
        left: 80%;
        transform: rotate(20deg);
    }
    90% {
        bottom: 100px;
        opacity: 1;
    }
    100% {
        bottom: -100px;
        left: 10%;
        transform: rotate(0deg);
        opacity: 0;
    }
}

.btc-float {
    position: fixed;
    top: -100px;
    right: 5%;
    opacity: 0;
    animation: btcFloat 12s ease infinite;
    pointer-events: none;
    z-index: 0;
    font-size: 80px;
}

@keyframes btcFloat {
    0% {
        top: -100px;
        opacity: 0;
        transform: rotate(-20deg);
    }
    10% {
        top: 100px;
        opacity: 0.7;
    }
    50% {
        top: 40%;
        right: 20%;
        transform: rotate(10deg);
    }
    90% {
        top: 100px;
        opacity: 0.7;
    }
    100% {
        top: -100px;
        opacity: 0;
        transform: rotate(-20deg);
    }
}

@keyframes floatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(-300px) rotate(180deg);
        opacity: 0;
    }
}

/* ========== MODAL STYLES ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95) !important;
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background: var(--card-bg);
    margin: 5% auto;
    padding: 30px;
    width: 80%;
    max-width: 800px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    animation: modalFadeIn 0.5s;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-50px);}
    to {opacity: 1; transform: translateY(0);}
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: var(--neon-blue);
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: var(--neon-pink);
    transform: rotate(90deg);
}

.news-title {
    font-size: 2.2rem;
    margin-bottom: 20px;
    font-weight: 900;
    color: var(--neon-yellow);
    text-shadow: 0 0 10px var(--neon-yellow);
}

.news-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    font-size: 1rem;
    color: var(--neon-blue);
}

.news-content {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.news-image {
    width: 100%;
    margin: 30px 0;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.copy-btn {
    background: linear-gradient(45deg, var(--neon-green), var(--neon-blue));
    color: #000;
    font-weight: 700;
    border: none;
    padding: 15px 25px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
}

.copy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 240, 255, 0.5);
}

/* ========== RESPONSIVE STYLES ========== */
@media (max-width: 768px) {
    /* Container and layout fixes */
    html, body {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
    }
    
    .container {
        width: 100vw;
        max-width: 100vw;
        padding: 10px;
        margin: 0;
    }
    
    #result-section {
        width: 100vw !important;
        max-width: 100vw !important;
        padding: 10px;
        margin: 0;
    }
    
    .card {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 15px;
    }
    
    /* Form elements */
    .selection-form {
        grid-template-columns: 1fr;
        grid-gap: 20px;
    }
    
    .selection-form,
    .form-group,
    select,
    input,
    .percentage-buttons,
    .percentage-presets-container,
    .visualize-btn-container,
    button#visualize-btn {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Chart fixes */
    .chart-container {
        height: 350px !important;
    }
    
    /* Header and text */
    .logo {
        font-size: 1.8rem;
    }
    
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    

    /* Percentage buttons */
    .percentage-button {
        font-size: 1.1rem;
        padding: 12px 5px;
        min-height: 60px;
        border-width: 2px;
    }
    
    /* Visualize button */
    button#visualize-btn {
        width: 100%;
        max-width: 100%;
        padding: 20px;
        margin-top: 20px;
    }
    
    /* Chart elements */
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .chart-title {
        font-size: 1.5rem;
        width: 100%;
    }
    
    /* Price info */
    .price-info {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Share buttons */
    /* Better positioning for mobile */
    .share-buttons-container {
        position: fixed;
        bottom: 90px; /* Higher position to avoid being cut off */
        right: 10px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        z-index: 9999;
    }
    
    /* Make buttons more compact but still readable */
    .share-button {
        width: auto;
        min-width: 200px; /* Ensure enough width */
        height: 50px;
        font-size: 14px;
        padding: 0 15px;
        border-radius: 25px;
        white-space: nowrap; /* Prevent text wrapping */
    }
    
    .share-button {
        width: 130px;
        height: 50px;
        font-size: 14px;
    }
    
    /* Moon image */
    .moon-img {
        width: 70px;
        height: 70px;
        top: -35px;
        right: -10px;
    }
    
    /* Meme badges */
    .meme-badges {
        justify-content: center;
        width: 100%;
    }
    
    .meme-badge {
        font-size: 0.7rem;
        padding: 6px 12px;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .news-title {
        font-size: 1.8rem;
    }
    
    /* Percentage display */
    .percentage-display {
        font-size: 1.6rem;
        padding: 10px 0;
        margin-top: 12px;
        width: 100%;
        text-align: center;
    }
}

    @media (max-height: 700px) {
        /* For short screens, move to a bottom dock */
        .share-buttons-container {
            flex-direction: row;
            bottom: 20px;
            right: 0;
            left: 0;
            justify-content: center;
            background-color: rgba(0, 0, 0, 0.8);
            padding: 10px;
            margin: 0;
        }
        
        .share-button {
            min-width: 150px; /* Smaller width when in dock */
        }
    }
    
    /* Add extra bottom padding to ensure content isn't hidden by fixed buttons */
    body {
        padding-bottom: 150px !important;
    }
    
    /* Specific adjustment for iPhone SE and similar small devices */
    @media (max-width: 375px), (max-height: 667px) {
        .share-button {
            min-width: 140px;
            height: 45px;
            font-size: 12px;
            padding: 0 12px;
        }
    }
}

@media (min-width: 769px) {
    /* Chart container for desktop */
    .chart-container {
        height: 450px;
        width: 100%;
        min-width: 100%;
        margin: 0 auto 20px;
    }
    
    /* Container sizing */
    .container {
        width: calc(100% - 40px);
        max-width: 1200px;
        padding: 20px;
        margin: 0 auto;
    }
}

/* Font display property for performance */
@font-face {
    font-family: 'Orbitron';
    font-display: swap;
}

@font-face {
    font-family: 'Press Start 2P';
    font-display: swap;
}

@media (max-width: 768px) {
    .percentage-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 buttons per row */
        gap: 10px;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
    }
    
    .percentage-button {
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        padding: 10px 5px;
        width: 100%;
        margin: 0;
    }
    
    /* Fix for the share buttons container position */
    .share-buttons-container {
        position: fixed;
        bottom: 100px; /* Move it up to avoid being cut off */
        right: 10px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        z-index: 9999; /* Ensure it's on top */
        width: auto; /* Allow natural width */
    }
    
    /* Make buttons smaller on mobile */
    .share-button {
        width: auto;
        min-width: 50px;
        height: 50px;
        padding: 0 15px;
        font-size: 14px;
        border-radius: 25px;
    }
    
    /* For very small screens, stack the meme badges */
    .meme-badges {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        width: 100%;
        margin-top: 15px;
    }
    
    .meme-badge {
        font-size: 0.7rem;
        padding: 6px 8px;
        white-space: nowrap;
    }
    
    /* Make sure the search input is fully visible */
    .coin-search {
        width: 100%;
        margin-bottom: 15px;
    }
    
    /* Ensure main container has proper spacing */
    .container {
        padding: 10px;
        box-sizing: border-box;
        width: 100%;
    }
    
    /* Fix for percentage display */
    .percentage-display {
        font-size: 1.8rem;
        padding: 5px;
        margin: 10px auto;
        text-align: center;
    }
    
    /* Make LFG button more visible */
    button#visualize-btn {
        margin-top: 20px;
        padding: 15px;
        font-size: 1.1rem;
        width: 100%;
        max-width: 100%;
        border-radius: 10px;
    }
}

/* For very small screens (iPhone SE, etc.) */
@media (max-width: 375px) {
    .percentage-buttons {
        grid-template-columns: repeat(2, 1fr); /* 2 buttons per row */
    }
    
    .meme-badges {
        grid-template-columns: 1fr; /* Single column */
    }
    
    .share-buttons-container {
        bottom: 70px; /* Move up more */
        right: 5px;
    }
    
    .share-button {
        height: 40px;
        min-width: 40px;
        font-size: 12px;
        padding: 0 10px;
    }
    .share-button.news-button {
    width: auto;
    min-width: 220px; /* Set minimum width to fit text */
    white-space: nowrap; /* Prevent text wrapping */
    padding: 0 20px; /* Add more horizontal padding */
    }
}


/* Adjustments for the action buttons to ensure they're always visible */
.action-buttons-container {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    padding: 10px;
    gap: 10px;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* Alternate mobile layout for share buttons as a dock */
@media (max-width: 768px) {
    .share-buttons-container.dock-style {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        padding: 10px 5px;
        background-color: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(10px);
        z-index: 9999;
    }
    
    .share-buttons-container.dock-style .share-button {
        width: auto;
        height: 40px;
        padding: 0 15px;
        border-radius: 20px;
    }
}

.bottom-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(8, 12, 21, 0.9);
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(0, 240, 255, 0.2);
    display: flex;
    justify-content: space-around;
    padding: 10px 15px;
    z-index: 9999;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5);
}

.bottom-action-bar .action-button {
    flex: 1;
    margin: 0 5px;
    padding: 10px;
    border-radius: 10px;
    font-size: 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 240, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.bottom-action-bar .action-button:hover {
    background-color: rgba(0, 240, 255, 0.2);
}

.bottom-action-bar .action-button i {
    font-size: 18px;
}