/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0a;
    color: #ffffff;
    font-family: 'Orbitron', monospace;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    height: 100vh;
    padding: 40px 0;
}

/* Text wrapper for positioning */
.text-wrapper {
    position: relative;
    display: inline-block;
    padding: 0;
}

/* Simple white text with rainbow border */
.neon-text {
    font-size: 5rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 8px;
    margin: 0;
    position: relative;
    z-index: 2;
    line-height: 1.2;
    text-align: center;
    -webkit-text-stroke: 10px transparent;
    text-stroke: 10px transparent;
    background: linear-gradient(45deg, 
        #ff0000, #ff3300, #ff6600, #ff9900, #ffcc00, #ffff00, 
        #ccff00, #99ff00, #66ff00, #33ff00, #00ff00, #00ff33,
        #00ff66, #00ff99, #00ffcc, #00ffff, #00ccff, #0099ff,
        #0066ff, #0033ff, #0000ff, #3300ff, #6600ff, #9900ff,
        #cc00ff, #ff00ff, #ff00cc, #ff0099, #ff0066, #ff0033, #ff0000);
    background-size: 1000% 1000%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: rainbowFlow 3s ease-in-out infinite;
}

@keyframes rainbowFlow {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 50% 100%;
    }
    50% {
        background-position: 100% 50%;
    }
    75% {
        background-position: 50% 0%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Neon themed button */
.neon-button {
    padding: 15px 40px;
    background: transparent;
    color: #ffffff;
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 3px;
    border: 3px solid #00ffff;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        inset 0 0 10px rgba(0, 255, 255, 0.1);
    animation: buttonGlow 2s ease-in-out infinite alternate;
}

.neon-button:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: scale(1.05);
    box-shadow: 
        0 0 20px #00ffff,
        0 0 40px #00ffff,
        0 0 60px #00ffff,
        inset 0 0 20px rgba(0, 255, 255, 0.2);
}

.neon-button:active {
    transform: scale(0.98);
}

@keyframes buttonGlow {
    0% {
        box-shadow: 
            0 0 5px #00ffff,
            0 0 10px #00ffff,
            inset 0 0 5px rgba(0, 255, 255, 0.1);
    }
    100% {
        box-shadow: 
            0 0 15px #00ffff,
            0 0 25px #00ffff,
            0 0 35px #00ffff,
            inset 0 0 15px rgba(0, 255, 255, 0.15);
    }
}

/* Animation container */
.animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    background: rgba(0, 0, 0, 0.9);
}

/* Floating small images */
.floating-image {
    position: absolute;
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #00ffff;
    box-shadow: 0 0 10px #00ffff;
    transition: all 1s ease-in-out;
    animation: sparkle 0.5s ease-in-out;
}

@keyframes sparkle {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Final content */
.final-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transition: all 1s ease-in-out;
}

.final-content.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.final-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 20px;
    border: 5px solid #00ffff;
    box-shadow: 
        0 0 20px #00ffff,
        0 0 40px #00ffff,
        0 0 60px #00ffff;
    animation: finalImageGlow 2s ease-in-out infinite alternate;
    margin-bottom: 30px;
}

@keyframes finalImageGlow {
    0% {
        box-shadow: 
            0 0 20px #00ffff,
            0 0 40px #00ffff,
            0 0 60px #00ffff;
        transform: scale(1);
    }
    100% {
        box-shadow: 
            0 0 30px #00ffff,
            0 0 60px #00ffff,
            0 0 90px #00ffff;
        transform: scale(1.05);
    }
}

.final-text {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 
        0 0 10px #00ffff,
        0 0 20px #00ffff,
        0 0 30px #00ffff;
    animation: textGlow 2s ease-in-out infinite alternate;
    letter-spacing: 5px;
    text-align: center;
}

@keyframes textGlow {
    0% {
        text-shadow: 
            0 0 10px #00ffff,
            0 0 20px #00ffff,
            0 0 30px #00ffff;
    }
    100% {
        text-shadow: 
            0 0 20px #00ffff,
            0 0 40px #00ffff,
            0 0 60px #00ffff,
            0 0 80px #00ffff;
    }
}

/* Retry button */
.retry-button {
    margin-top: 30px;
    padding: 12px 30px;
    background: transparent;
    color: #ffffff;
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    border: 3px solid #ff6600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 0 10px #ff6600,
        0 0 20px #ff6600,
        inset 0 0 10px rgba(255, 102, 0, 0.1);
    animation: retryGlow 2s ease-in-out infinite alternate;
}

.retry-button:hover {
    background: rgba(255, 102, 0, 0.1);
    transform: scale(1.05);
    box-shadow: 
        0 0 20px #ff6600,
        0 0 40px #ff6600,
        0 0 60px #ff6600,
        inset 0 0 20px rgba(255, 102, 0, 0.2);
}

.retry-button:active {
    transform: scale(0.98);
}

@keyframes retryGlow {
    0% {
        box-shadow: 
            0 0 5px #ff6600,
            0 0 10px #ff6600,
            inset 0 0 5px rgba(255, 102, 0, 0.1);
    }
    100% {
        box-shadow: 
            0 0 15px #ff6600,
            0 0 25px #ff6600,
            0 0 35px #ff6600,
            inset 0 0 15px rgba(255, 102, 0, 0.15);
    }
}

/* Settings button */
.settings-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: transparent;
    border: 2px solid #00ffff;
    border-radius: 50%;
    color: #00ffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.3),
        0 0 20px rgba(0, 255, 255, 0.2);
    animation: settingsGlow 2s ease-in-out infinite alternate;
}

.settings-button:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: scale(1.1);
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.5),
        0 0 30px rgba(0, 255, 255, 0.3);
}

@keyframes settingsGlow {
    0% {
        box-shadow: 
            0 0 5px rgba(0, 255, 255, 0.3),
            0 0 10px rgba(0, 255, 255, 0.2);
    }
    100% {
        box-shadow: 
            0 0 15px rgba(0, 255, 255, 0.5),
            0 0 25px rgba(0, 255, 255, 0.3);
    }
}

/* Settings panel */
.settings-panel {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 160px;
    max-height: 180px;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ffff;
    border-radius: 8px;
    z-index: 1001;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: 
        0 0 15px rgba(0, 255, 255, 0.3),
        0 0 25px rgba(0, 255, 255, 0.1);
}

.settings-panel.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.settings-content {
    padding: 10px;
}

.image-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.image-option {
    cursor: pointer;
}

.image-name {
    display: block;
    padding: 6px 8px;
    color: #ffffff;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(0, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-name:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00ffff;
    transform: scale(1.02);
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.image-name.selected {
    background: #00ffff;
    color: #000000;
    font-weight: bold;
    border-color: #00ffff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

/* Loading and no images messages */
.loading, .no-images {
    text-align: center;
    padding: 10px;
    color: #00ffff;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    border: 1px dashed rgba(0, 255, 255, 0.5);
    border-radius: 4px;
    background: rgba(0, 255, 255, 0.03);
}

.success-message {
    text-align: center;
    padding: 8px;
    color: #00ff00;
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    border: 1px solid rgba(0, 255, 0, 0.5);
    border-radius: 4px;
    background: rgba(0, 255, 0, 0.05);
    margin-bottom: 8px;
    animation: successGlow 2s ease-in-out infinite alternate;
}

@keyframes successGlow {
    0% { 
        box-shadow: 0 0 5px rgba(0, 255, 0, 0.3);
    }
    100% { 
        box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Manual input section */
.manual-section {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 255, 255, 0.3);
}

.manual-input {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.manual-input input {
    padding: 5px 8px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.5);
    border-radius: 3px;
    color: #ffffff;
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
}

.manual-input input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.manual-input input:focus {
    border-color: #00ffff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.manual-input button {
    padding: 5px 8px;
    background: transparent;
    border: 1px solid #00ffff;
    border-radius: 3px;
    color: #00ffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
}

.manual-input button:hover {
    background: rgba(0, 255, 255, 0.1);
    transform: scale(1.02);
}

/* Responsive design */
@media (max-width: 768px) {
    .neon-text {
        font-size: 3rem;
        letter-spacing: 4px;
    }
}

@media (max-width: 480px) {
    .neon-text {
        font-size: 2rem;
        letter-spacing: 2px;
    }
}