/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', cursive;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header and ticker */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticker {
    display: flex;
    align-items: center;
    gap: 20px;
    font-weight: 700;
    font-size: 1.2em;
}

.header-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.twitter-btn, .about-btn {
    background: linear-gradient(45deg, #1da1f2, #0d8bd9);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    font-family: 'Comic Neue', cursive;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
}

.about-btn {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.twitter-btn:hover, .about-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.4);
}

.about-btn:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.ticker-symbol {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5em;
    font-family: 'Creepster', cursive;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.ticker-price {
    color: #2ecc71;
    font-size: 1.3em;
}

.ticker-change {
    color: #27ae60;
    background: rgba(46, 204, 113, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9em;
}

/* Main content */
.main-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.title-section {
    text-align: center;
    margin-bottom: 30px;
}

.main-title {
    font-family: 'Creepster', cursive;
    font-size: 3.5em;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    animation: rainbow 3s ease-in-out infinite alternate;
}

@keyframes rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

.subtitle {
    font-size: 1.3em;
    color: #666;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-group label {
    font-weight: 700;
    color: #333;
    font-size: 1.1em;
}

#flyName {
    padding: 12px 15px;
    border: 3px solid #ddd;
    border-radius: 25px;
    font-size: 1em;
    font-family: 'Comic Neue', cursive;
    font-weight: 600;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

#flyName:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
    transform: scale(1.05);
}

.spawn-btn {
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    color: white;
    font-weight: 700;
    font-size: 1.1em;
    font-family: 'Comic Neue', cursive;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    text-transform: uppercase;
}

.spawn-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.spawn-btn:active {
    transform: translateY(0) scale(0.98);
}

.fly-count {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.2em;
    min-width: 60px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

/* Progress section */
.progress-section {
    margin-bottom: 30px;
}

.progress-label {
    display: block;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
    text-align: center;
}

.progress-bar {
    position: relative;
    background: rgba(0, 0, 0, 0.1);
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #feca57, #4ecdc4, #45b7d1);
    border-radius: 15px;
    transition: width 0.5s ease;
    width: 0%;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: #333;
    font-size: 1em;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

.progress-milestones {
    display: flex;
    justify-content: space-between;
    font-size: 0.9em;
    font-weight: 600;
    color: #666;
}

/* Canvas */
#flyCanvas {
    width: 100%;
    height: 600px;
    border: 3px solid #ddd;
    border-radius: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.1);
    display: block;
}

/* Stats panel */
.stats-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stats-panel h3 {
    font-family: 'Creepster', cursive;
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5em;
    text-align: center;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-item span:first-child {
    color: #666;
}

.stat-item span:last-child {
    color: #333;
    font-weight: 700;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-title {
        font-size: 2.5em;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-group {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    #flyCanvas {
        height: 400px;
    }
    
    .progress-milestones {
        font-size: 0.7em;
    }
}

/* Fun animations */
.spawn-btn {
    position: relative;
    overflow: hidden;
}

.spawn-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.spawn-btn:hover::before {
    left: 100%;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
    backdrop-filter: blur(15px);
    margin: 10% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-family: 'Comic Neue', cursive;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content h2 {
    font-family: 'Creepster', cursive;
    color: #333;
    margin-bottom: 20px;
    font-size: 2em;
    text-align: center;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.modal-content ul {
    margin: 15px 0;
    padding-left: 20px;
}

.modal-content li {
    color: #444;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 1.1em;
}

.meme-text {
    text-align: center;
    font-style: italic;
    color: #ff6b6b;
    font-weight: 700;
    font-size: 1.2em;
    margin-top: 20px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #ff6b6b;
    text-decoration: none;
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        margin: 20% auto;
        padding: 20px;
        width: 95%;
    }
    
    .modal-content h2 {
        font-size: 1.5em;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-buttons {
        justify-content: center;
    }
}
