/* Reusable components and UI elements */
.mode-selector {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.mode-selector.universe-selector {
    margin-bottom: 20px;
}

.universe-selector .mode-option {
    width: calc(33.33% - 10px);
    padding: 10px;
    min-height: 150px;
}

.universe-selector .mode-option img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.mode-selector input[type="radio"] {
    display: none;
}

.mode-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    border: 3px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
    flex-grow: 1;
    background-color: var(--other-ball-bg);
}

.mode-option strong {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.mode-option small {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.mode-option.comic { background-color: var(--comic-bg); }
.mode-option.adventure { background-color: var(--adventure-bg); }
.mode-option.historic { background-color: var(--historic-bg); }
.mode-option.mayhem { background-color: var(--mayhem-bg); }
.mode-option.astronomical { background-color: var(--astronomical-bg); }
.mode-option.universal { background-color: var(--universal-bg); }

.mode-selector input[type="radio"]:checked + .mode-option {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
}

#generate-btn {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.5rem;
    font-family: 'Bangers', cursive;
    letter-spacing: 1.5px;
    color: white;
    background-color: #5cb85c;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    text-shadow: 1px 1px #333;
}

#generate-btn:hover {
    background-color: #4cae4c;
    transform: scale(1.02);
}

#generate-btn:disabled {
    background-color: var(--secondary-color);
    cursor: not-allowed;
}

.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 40px 20px;
    text-align: center;
    color: var(--secondary-color);
}

.polandball-loader {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: white;
    border: 3px solid black;
    position: relative;
    overflow: hidden;
    animation: bounce 1s infinite alternate;
}

.polandball-loader::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    height: 50%;
    background-color: red;
    border-bottom: 3px solid black;
}

@keyframes bounce {
    from { transform: translateY(0px); }
    to { transform: translateY(-20px); }
}