/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    cursor: none;
}

/* Sky Background - made darker */
.sky-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, #050510, #0a0a20, #050510);
    z-index: -10;
    overflow: hidden;
}

.stars-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -9;
}

.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    opacity: 0.6;
    filter: blur(0.5px);
}

.star.twinkle {
    animation: twinkle 4s infinite ease-in-out;
}

.nebula {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(76, 0, 255, 0.08) 0%, rgba(0, 0, 0, 0) 40%),
        radial-gradient(circle at 70% 60%, rgba(0, 128, 255, 0.05) 0%, rgba(0, 0, 0, 0) 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 0, 128, 0.03) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: -8;
    opacity: 0.4;
    filter: blur(30px);
}

/* Social Links */
.social-links {
    position: fixed;
    top: 30px;
    left: 30px;
    display: flex;
    gap: 15px;
    z-index: 100;
}

.social-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(5, 5, 20, 0.7);
    border: 1px solid rgba(255, 152, 0, 0.3);
    color: #fff;
    text-decoration: none;
    font-size: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.2);
    backdrop-filter: blur(5px);
}

.social-link:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 0 30px rgba(255, 204, 0, 0.4);
    background: rgba(10, 10, 30, 0.7);
    border-color: rgba(255, 204, 0, 0.5);
}

.twitter:hover {
    color: #1DA1F2;
    border-color: #1DA1F2;
    box-shadow: 0 0 30px rgba(29, 161, 242, 0.4);
}

.fourmeme {
    font-weight: bold;
    position: relative;
    padding: 8px;
}

.fourmeme-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.2) contrast(1.1);
    transition: all 0.3s ease;
}

.fourmeme:hover .fourmeme-img {
    filter: brightness(1.4) contrast(1.2);
    transform: scale(1.05);
}

.fourmeme:hover {
    border-color: #9C27B0;
    box-shadow: 0 0 30px rgba(156, 39, 176, 0.4);
}

/* Token Stats */
.token-stats {
    position: absolute;
    top: 170px;
    right: 50px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 50;
}

.stat-item {
    background: rgba(5, 5, 20, 0.7);
    padding: 10px 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 152, 0, 0.3);
    text-align: right;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.2);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(255, 152, 0, 0.3);
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    background: linear-gradient(90deg, #fff, #ff9100);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* API Status */
.api-status {
    position: absolute;
    bottom: 25px;
    right: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(5, 5, 20, 0.5);
    padding: 5px 10px;
    border-radius: 20px;
    z-index: 50;
}

.refresh-button {
    background: none;
    border: none;
    color: #ff9100;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.refresh-button:hover {
    transform: rotate(180deg);
    color: #ffcc00;
}

.refresh-button.loading {
    animation: spin 1s infinite linear;
}

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

/* Custom Cursor */
.cursor-follow {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,204,0,0.8) 0%, rgba(255,165,0,0.4) 70%, rgba(255,165,0,0) 100%);
    box-shadow: 0 0 20px 10px rgba(255, 204, 0, 0.5);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: screen;
    filter: blur(2px);
}

/* Main Container */
.main-container {
    position: relative;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Hat Container */
.hat-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

#hat-image {
    max-width: 100%;
    max-height: 100%;
    position: relative;
    z-index: 2;
    transform-style: preserve-3d;
    filter: drop-shadow(0 0 10px rgba(255, 204, 0, 0.7));
}

/* Aura Glow Effect */
.aura-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(255, 87, 34, 0.5) 0%, /* Orange-red */
        rgba(255, 152, 0, 0.4) 30%, /* Amber */
        rgba(255, 193, 7, 0.3) 50%, /* Yellow */
        rgba(255, 235, 59, 0.2) 70%, /* Light yellow */
        rgba(0, 0, 0, 0) 80%
    );
    filter: blur(30px);
    z-index: 1;
    transition: all 1s ease;
    mix-blend-mode: screen;
}

/* Flying Numbers Animation - moved to the front layer */
.flying-numbers-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10000;
    overflow: hidden;
    perspective: 1000px;
}

.flying-number {
    position: absolute;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translateY(0);
    font-size: 24px;
    user-select: none;
    pointer-events: none;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.flying-number.plus-200 {
    color: #76ff03; /* Light green */
    text-shadow: 0 0 10px rgba(118, 255, 3, 0.9);
}

.flying-number.plus-1000 {
    color: #ffea00; /* Yellow */
    text-shadow: 0 0 10px rgba(255, 234, 0, 0.9);
    font-size: 28px;
}

.flying-number.plus-1500 {
    color: #ff9100; /* Orange */
    text-shadow: 0 0 10px rgba(255, 145, 0, 0.9);
    font-size: 32px;
}

/* Title Styles */
.title-container {
    text-align: center;
    margin-bottom: 3rem;
    perspective: 1000px;
}

.title {
    font-size: 5rem;
    font-weight: 300;
    letter-spacing: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.hat-text {
    color: #fff;
    position: relative;
    display: inline-block;
    transform-style: preserve-3d;
    animation: floatText 6s ease-in-out infinite;
}

.aura-text {
    background: linear-gradient(90deg, #ff9100, #ffea00); /* Updated gradient */
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
    transform-style: preserve-3d;
    animation: floatText 6s ease-in-out infinite 1s;
}

.ticker {
    font-size: 3rem;
    font-weight: 300;
    color: rgba(255, 204, 0, 0.8);
    letter-spacing: 5px;
    opacity: 0;
    animation: fadeIn 2s ease-in-out forwards 1s;
}

/* Price Indicator */
.price-indicator {
    position: absolute;
    top: 50px;
    right: 50px;
    background: rgba(5, 5, 20, 0.7);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 152, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.2);
    backdrop-filter: blur(5px);
    z-index: 50;
}

.price-value {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(90deg, #fff, #ff9100);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 5px;
}

.price-change {
    font-size: 1rem;
    padding: 3px 8px;
    border-radius: 5px;
}

.price-change.positive {
    background-color: rgba(0, 255, 0, 0.2);
    color: #00ff00;
}

.price-change.negative {
    background-color: rgba(255, 0, 0, 0.2);
    color: #ff0000;
}

/* Price Chart */
.price-history-container {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 600px;
    height: 100px;
    background: rgba(5, 5, 20, 0.5);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(5px);
    z-index: 20;
}

#price-chart {
    width: 100%;
    height: 100%;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.6;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.3;
    }
}

@keyframes floatText {
    0% {
        transform: translateY(0) translateZ(0);
    }
    50% {
        transform: translateY(-10px) translateZ(20px);
    }
    100% {
        transform: translateY(0) translateZ(0);
    }
}

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

@keyframes twinkle {
    0%, 100% {
        opacity: 0.1;
        transform: scale(0.8);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .social-links {
        top: 20px;
        left: 20px;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .fourmeme {
        padding: 6px;
    }
    
    .token-stats {
        top: 150px;
        right: 20px;
    }
    
    .stat-item {
        padding: 8px 12px;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .stat-value {
        font-size: 1rem;
    }
    
    .hat-container {
        width: 200px;
        height: 200px;
    }
    
    .title {
        font-size: 3rem;
        gap: 1rem;
    }
    
    .ticker {
        font-size: 2rem;
    }
    
    .price-indicator {
        top: 20px;
        right: 20px;
        padding: 10px;
    }
    
    .price-value {
        font-size: 1.5rem;
    }
    
    .api-status {
        bottom: 15px;
        right: 15px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .social-links {
        top: 15px;
        left: 15px;
        gap: 10px;
    }
    
    .social-link {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .fourmeme {
        padding: 5px;
    }
    
    .token-stats {
        top: 70px;
        right: 15px;
    }
    
    .stat-item {
        padding: 5px 10px;
    }
    
    .hat-container {
        width: 150px;
        height: 150px;
    }
    
    .title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .ticker {
        font-size: 1.5rem;
    }
    
    .price-indicator {
        padding: 8px;
    }
    
    .price-value {
        font-size: 1.2rem;
    }
    
    .price-history-container {
        bottom: 50px;
    }
}