/* ========================================
   RICK'S SHARED COMPONENTS
   Music Player, Effects, Achievements
======================================== */

/* Music Player - Floating */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.9);
    border: 2px solid var(--portal-green, #00ff88);
    border-radius: 15px;
    padding: 10px 15px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 0 30px rgba(0,255,136,0.3);
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s ease;
}

.music-player:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(0,255,136,0.5);
}

.music-player.minimized {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
}

.music-player.minimized .player-controls,
.music-player.minimized .track-name {
    display: none;
}

.player-btn {
    background: transparent;
    border: none;
    color: #00ff88;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    padding: 5px;
}

.player-btn:hover {
    transform: scale(1.2);
    text-shadow: 0 0 10px #00ff88;
}

.track-name {
    color: #00ff88;
    font-size: 0.7rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.volume-slider {
    width: 60px;
    height: 4px;
    -webkit-appearance: none;
    background: rgba(0,255,136,0.3);
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #00ff88;
    border-radius: 50%;
    cursor: pointer;
}

/* Portal Click Effects */
.portal-click {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    animation: portalClickAnim 0.6s ease-out forwards;
}

.portal-click-ring {
    width: 40px;
    height: 40px;
    border: 3px solid #00ff88;
    border-radius: 50%;
    animation: portalRingExpand 0.6s ease-out forwards;
}

@keyframes portalClickAnim {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0); }
    50% { opacity: 0.8; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(2); }
}

@keyframes portalRingExpand {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(3); opacity: 0; }
}

/* Achievement Toast */
.achievement-toast {
    position: fixed;
    top: 20px;
    right: -400px;
    background: linear-gradient(135deg, rgba(0,0,0,0.95), rgba(20,20,40,0.95));
    border: 2px solid gold;
    border-radius: 15px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    box-shadow: 0 0 40px rgba(255,215,0,0.4);
    animation: achievementSlide 4s ease-in-out forwards;
    font-family: 'Orbitron', sans-serif;
}

@keyframes achievementSlide {
    0% { right: -400px; }
    10% { right: 20px; }
    90% { right: 20px; }
    100% { right: -400px; }
}

.achievement-icon {
    font-size: 2.5rem;
    animation: achievementBounce 0.5s ease infinite;
}

@keyframes achievementBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.achievement-text h3 {
    color: gold;
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.achievement-text p {
    color: #aaa;
    font-size: 0.7rem;
}

/* Page Transition Portal */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #00ff88 0%, #00cc66 30%, transparent 70%);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transform: scale(0);
    transition: all 0.5s ease;
}

.page-transition.active {
    opacity: 1;
    transform: scale(3);
}

/* Drunk Mode */
body.drunk-mode {
    animation: drunkWobble 2s ease-in-out infinite;
}

@keyframes drunkWobble {
    0%, 100% { transform: rotate(0deg) translateX(0); }
    25% { transform: rotate(1deg) translateX(5px); }
    75% { transform: rotate(-1deg) translateX(-5px); }
}

/* Dark/Light Theme Toggle */
body.light-dimension {
    --dark-space: #e0e0e0;
    --portal-green: #00aa55;
    background: linear-gradient(135deg, #f0f0f0, #d0d0d0);
    color: #111;
}

/* Meeseeks Box */
.meeseeks-box {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #5bc0eb, #3a9fc4);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(91,192,235,0.4);
    transition: all 0.3s;
    z-index: 100;
}

.meeseeks-box:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(91,192,235,0.6);
}

.meeseeks-box::after {
    content: '👆';
    position: absolute;
    top: -30px;
    font-size: 1.5rem;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
