
.theme-carousel {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 15px;
    padding: 10px 0;
}

.theme-carousel::-webkit-scrollbar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.theme-carousel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.theme-carousel::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.theme-preview-wrapper {
    flex: 0 0 auto;
    position: relative;
    min-width: 100px;
}

.theme-preview-wrapper input[type="radio"] {
    display: none;
}

.theme-preview {
    display: block;
    width: 120px;
    height: 160px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease-in-out, box-shadow 0.3s ease;
}

.theme-preview-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.theme-title {
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    padding: 5px;
    border-radius: 4px;
    background: rgba(0,0,0,0.2);
}

.theme-buttons-preview {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.theme-buttons-preview span {
    font-size: 11px;
    padding: 5px;
    text-align: center;
    border-radius: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.theme-preview-wrapper input[type="radio"]:checked + .theme-preview {
    transform: scale(1.05);
    box-shadow: 0 0 0 2px #fff, 0 0 15px rgba(255,255,255,0.5);
}

.click-btn-preview {
    background-color: #3498db !important;
    color: white !important;
}

.vibrate-btn-preview {
    background-color: #f39c12 !important;
    color: black !important;
}

.shock-btn-preview {
    background-color: #e74c3c !important;
    color: white !important;
}

/* Neon Theme */
@keyframes neon-pulse {
    0% { box-shadow: 0 0 5px #0ff, 0 0 10px #0ff inset; }
    50% { box-shadow: 0 0 15px #0ff, 0 0 20px #0ff inset; }
    100% { box-shadow: 0 0 5px #0ff, 0 0 10px #0ff inset; }
}

@keyframes neon-bg {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.theme-neon {
    background: linear-gradient(45deg, #000033, #0b0b2a, #170b27);
    background-size: 200% 200%;
    animation: neon-bg 8s linear infinite;
    color: #0ff;
    border: 1px solid #0ff;
    box-shadow: 0 0 8px #0ff, 0 0 10px #0ff inset;
}

.theme-neon .theme-title {
    text-shadow: 0 0 5px #0ff;
}

/* Midnight Theme - Revised */
@keyframes midnight-sky-subtle {
    0% { background-color: #010310; }
    50% { background-color: #0a041f; }
    100% { background-color: #010310; }
}

.theme-midnight {
    background-color: #010310;
    animation: midnight-sky-subtle 15s ease infinite;
    color: #9eadc8;
    border: 1px solid #2c3e50;
    box-shadow: 0 0 15px rgba(44, 62, 80, 0.3) inset;
}

.theme-midnight .theme-title {
    text-shadow: 0 0 4px rgba(158, 173, 200, 0.5);
}

/* Ember Theme */
@keyframes ember-glow {
    0% { box-shadow: 0 0 5px #ff6b47, 0 0 10px #ff6b47 inset; }
    50% { box-shadow: 0 0 15px #ff6b47, 0 0 20px #ff6b47 inset; }
    100% { box-shadow: 0 0 5px #ff6b47, 0 0 10px #ff6b47 inset; }
}

.theme-ember {
    background: linear-gradient(45deg, #3d0000, #1a0000);
    color: #ff7878;
    border: 1px solid rgba(255, 120, 120, 0.4);
    animation: ember-glow 4s ease-in-out infinite;
}

/* Toxic Theme */
@keyframes toxic-pulse {
    0% { box-shadow: 0 0 8px #39ff14; }
    50% { box-shadow: 0 0 20px #39ff14; }
    100% { box-shadow: 0 0 8px #39ff14; }
}

@keyframes toxic-bg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.theme-toxic {
    background: linear-gradient(45deg, #091c00, #0d2605, #162300);
    background-size: 200% 200%;
    animation: toxic-bg 8s ease infinite, toxic-pulse 4s ease-in-out infinite;
    color: #39ff14;
    border: 1px solid rgba(57, 255, 20, 0.4);
}

/* Frost Theme */
@keyframes frost-shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.theme-frost {
    background: linear-gradient(135deg, #051a2a, #082641, #031628);
    background-size: 200% 200%;
    animation: frost-shimmer 10s ease infinite;
    color: #a8e6ff;
    border: 1px solid rgba(168, 230, 255, 0.3);
    box-shadow: 0 0 10px rgba(168, 230, 255, 0.2);
}

/* Phantom Theme - Revised */
@keyframes phantom-wisps {
    0% { background-position: 0% 50%; opacity: 0.6; }
    25% { opacity: 0.9; }
    50% { background-position: 100% 50%; opacity: 0.6; }
    75% { opacity: 0.9; }
    100% { background-position: 0% 50%; opacity: 0.6; }
}

.theme-phantom {
    background: linear-gradient(160deg, #18101f, #2c203a, #120c18);
    background-size: 300% 300%;
    animation: phantom-wisps 20s ease-in-out infinite;
    color: #b0a8c0;
    border: 1px solid rgba(176, 168, 192, 0.25);
    box-shadow: 0 0 12px rgba(44, 32, 58, 0.5) inset;
}

.theme-phantom .theme-title {
    text-shadow: 0 0 5px rgba(176, 168, 192, 0.4);
}

/* Sunset Theme */
@keyframes sunset-colors {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.theme-sunset {
    background: linear-gradient(135deg, #33001b, #4d0026, #33001b);
    background-size: 400% 400%;
    animation: sunset-colors 15s ease infinite;
    color: #ffccf2;
    border: 1px solid rgba(255, 204, 242, 0.3);
}

/* Galaxy Theme */
@keyframes galaxy-stars {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

@keyframes galaxy-glow {
    0% { box-shadow: 0 0 10px rgba(138, 43, 226, 0.5); }
    50% { box-shadow: 0 0 20px rgba(138, 43, 226, 0.8); }
    100% { box-shadow: 0 0 10px rgba(138, 43, 226, 0.5); }
}

.theme-galaxy {
    background: linear-gradient(135deg, #090019, #170033, #0d001f);
    background-size: 400% 400%;
    animation: galaxy-stars 20s ease infinite, galaxy-glow 5s ease-in-out infinite;
    color: #d8a0ff;
    border: 1px solid rgba(216, 160, 255, 0.3);
}

/* Cosmic Ray Theme */
@keyframes cosmic-ray-bg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes cosmic-ray-pulse {
    0% { box-shadow: 0 0 7px rgba(157, 112, 255, 0.4), 0 0 12px rgba(157, 112, 255, 0.3) inset; }
    50% { box-shadow: 0 0 15px rgba(157, 112, 255, 0.7), 0 0 20px rgba(157, 112, 255, 0.5) inset; }
    100% { box-shadow: 0 0 7px rgba(157, 112, 255, 0.4), 0 0 12px rgba(157, 112, 255, 0.3) inset; }
}

.theme-cosmic-ray {
    background: linear-gradient(120deg, #0a0118, #1a0033, #2c004f, #1a0033, #0a0118);
    background-size: 300% 300%;
    color: #e0cfffa0;
    border: 1px solid rgba(157, 112, 255, 0.5);
    animation: cosmic-ray-bg 18s ease infinite, cosmic-ray-pulse 3s ease-in-out infinite;
    text-shadow: 0 0 5px rgba(224, 207, 255, 0.3);
}

.theme-cosmic-ray .theme-title {
    text-shadow: 0 0 6px rgba(157, 112, 255, 0.7);
}

.pet-card-preview {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 15px;
    padding: 15px;
    transition: all 0.3s ease;
}

.pet-card-preview-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.pet-avatar-preview {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    border: 2px solid rgba(255,255,255,0.2);
}

.pet-name-preview {
    font-weight: 600;
    font-size: 18px;
}

.mood-indicator-preview {
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 5px;
    background: rgba(255,255,255,0.1);
    display: inline-block;
}

.interaction-buttons-preview {
    display: flex;
    gap: 10px;
}

.interaction-buttons-preview button {
    flex: 1;
    padding: 8px 0;
    border-radius: 5px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pet-card-preview.theme-neon {
    background: linear-gradient(45deg, #000033, #0b0b2a, #170b27);
    background-size: 200% 200%;
    animation: neon-bg 8s linear infinite;
    color: #0ff;
    border: 1px solid #0ff;
    box-shadow: 0 0 8px #0ff, 0 0 10px #0ff inset;
}

.pet-card-preview.theme-midnight {
    background-color: #010310;
    animation: midnight-sky-subtle 15s ease infinite;
    color: #9eadc8;
    border: 1px solid #2c3e50;
    box-shadow: 0 0 15px rgba(44, 62, 80, 0.3) inset;
}

.pet-card-preview.theme-ember {
    background: linear-gradient(45deg, #3d0000, #1a0000);
    color: #ff7878;
    border: 1px solid rgba(255, 120, 120, 0.4);
    animation: ember-glow 4s ease-in-out infinite;
}

.pet-card-preview.theme-toxic {
    background: linear-gradient(45deg, #091c00, #0d2605, #162300);
    background-size: 200% 200%;
    animation: toxic-bg 8s ease infinite, toxic-pulse 4s ease-in-out infinite;
    color: #39ff14;
    border: 1px solid rgba(57, 255, 20, 0.4);
}

.pet-card-preview.theme-frost {
    background: linear-gradient(135deg, #051a2a, #082641, #031628);
    background-size: 200% 200%;
    animation: frost-shimmer 10s ease infinite;
    color: #a8e6ff;
    border: 1px solid rgba(168, 230, 255, 0.3);
    box-shadow: 0 0 10px rgba(168, 230, 255, 0.2);
}

.pet-card-preview.theme-phantom {
    background: linear-gradient(160deg, #18101f, #2c203a, #120c18);
    background-size: 300% 300%;
    color: #b0a8c0;
    border: 1px solid rgba(176, 168, 192, 0.25);
    animation: phantom-wisps 20s ease-in-out infinite;
}

.pet-card-preview.theme-sunset {
    background: linear-gradient(135deg, #33001b, #4d0026, #33001b);
    background-size: 400% 400%;
    animation: sunset-colors 15s ease infinite;
    color: #ffccf2;
    border: 1px solid rgba(255, 204, 242, 0.3);
}

.pet-card-preview.theme-galaxy {
    background: linear-gradient(135deg, #090019, #170033, #0d001f);
    background-size: 400% 400%;
    animation: galaxy-stars 20s ease infinite, galaxy-glow 5s ease-in-out infinite;
    color: #d8a0ff;
    border: 1px solid rgba(216, 160, 255, 0.3);
}

.pet-card-preview.theme-cosmic-ray {
    background: linear-gradient(120deg, #0a0118, #1a0033, #2c004f, #1a0033, #0a0118);
    background-size: 300% 300%;
    color: #e0cfffa0;
    border: 1px solid rgba(157, 112, 255, 0.5);
    animation: cosmic-ray-bg 18s ease infinite, cosmic-ray-pulse 3s ease-in-out infinite;
}

.theme-neon.page-section {
    background: linear-gradient(45deg, #000033, #0b0b2a, #170b27);
    background-size: 200% 200%;
    animation: neon-bg 8s linear infinite;
    color: #0ff;
    border: 1px solid #0ff;
    box-shadow: 0 0 8px #0ff, 0 0 10px #0ff inset;
}

.theme-midnight.page-section {
    background-color: #010310;
    animation: midnight-sky-subtle 15s ease infinite;
    color: #9eadc8;
    border: 1px solid #2c3e50;
    box-shadow: 0 0 15px rgba(44, 62, 80, 0.3) inset;
}

.theme-ember.page-section {
    background: linear-gradient(45deg, #3d0000, #1a0000);
    color: #ff7878;
    border: 1px solid rgba(255, 120, 120, 0.4);
    animation: ember-glow 4s ease-in-out infinite;
}

.theme-toxic.page-section {
    background: linear-gradient(45deg, #091c00, #0d2605, #162300);
    background-size: 200% 200%;
    animation: toxic-bg 8s ease infinite, toxic-pulse 4s ease-in-out infinite;
    color: #39ff14;
    border: 1px solid rgba(57, 255, 20, 0.4);
}

.theme-frost.page-section {
    background: linear-gradient(135deg, #051a2a, #082641, #031628);
    background-size: 200% 200%;
    animation: frost-shimmer 10s ease infinite;
    color: #a8e6ff;
    border: 1px solid rgba(168, 230, 255, 0.3);
    box-shadow: 0 0 10px rgba(168, 230, 255, 0.2);
}

.theme-phantom.page-section {
    background-color: #120c18;
    border-top: 1px solid rgba(176, 168, 192, 0.15);
    box-shadow: 0 -5px 15px -5px rgba(44, 32, 58, 0.2);
}

.theme-sunset.page-section {
    background: linear-gradient(135deg, #33001b, #4d0026, #33001b);
    background-size: 400% 400%;
    animation: sunset-colors 15s ease infinite;
    color: #ffccf2;
    border: 1px solid rgba(255, 204, 242, 0.3);
}

.theme-galaxy.page-section {
    background: linear-gradient(135deg, #090019, #170033, #0d001f);
    background-size: 400% 400%;
    animation: galaxy-stars 20s ease infinite, galaxy-glow 5s ease-in-out infinite;
    color: #d8a0ff;
    border: 1px solid rgba(216, 160, 255, 0.3);
}

.theme-cosmic-ray.page-section {
    background-color: #0a0118;
    border-top: 1px solid rgba(157, 112, 255, 0.3);
    box-shadow: 0 -5px 15px -5px rgba(157, 112, 255, 0.1);
}

[class*="theme-"] .interaction-buttons-preview button.click-btn-preview {
    background-color: #3498db !important;
    color: white !important;
    border: none;
}

[class*="theme-"] .interaction-buttons-preview button.vibrate-btn-preview {
    background-color: #f39c12 !important;
    color: white !important;
    border: none;
}

[class*="theme-"] .interaction-buttons-preview button.shock-btn-preview {
    background-color: #e74c3c !important;
    color: white !important;
    border: none;
}

[class*="theme-"] .interaction-buttons-preview button:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

[class*="theme-"] .theme-title,
[class*="theme-"] .pet-name-preview,
[class*="theme-"] h3,
[class*="theme-"] h4 {
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

[class*="theme-"] .mood-indicator-preview {
    background: rgba(255,255,255,0.1);
}
