/* Admin Interface - Driver Controls Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

.admin-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* Header Styles */
.admin-header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.logo i {
    font-size: 28px;
}

.admin-header h1 {
    font-size: 24px;
    font-weight: 600;
}

.controls-bar {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.carplay-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(252, 182, 159, 0.4);
}

.carplay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 182, 159, 0.6);
}

.play-next-btn, .clear-all-btn, .refresh-btn, .logout-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 160px;
    justify-content: center;
}

.refresh-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.3);
    min-width: 50px;
    padding: 12px;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(155, 89, 182, 0.4);
}

.logout-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    min-width: 100px;
    padding: 12px 16px;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* Main Control Section - Prominent Play Button */
.main-control-section {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    padding: 0 20px;
}

.main-control-section .play-next-btn {
    padding: 18px 32px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 30px;
    min-width: 250px;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
    transform: scale(1.05);
}

.main-control-section .play-next-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.5);
}

/* Section Header - Flex container for title and compact button */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: nowrap;
    min-height: 48px; /* Ensure consistent height */
}

.section-title {
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.4; /* Consistent line height */
    height: 48px; /* Match section header height */
}

/* Compact Clear All Button */
.clear-all-btn-compact {
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    min-width: 130px;
    justify-content: center;
    flex-shrink: 0;
    height: 48px; /* Match section header height */
    line-height: 1; /* Consistent line height for button text */
}

.clear-all-btn-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.clear-all-btn-compact:disabled {
    background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 5px rgba(149, 165, 166, 0.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .section-header {
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }
    
    .clear-all-btn-compact {
        min-width: 110px;
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .main-control-section .play-next-btn {
        min-width: 200px;
        padding: 16px 24px;
        font-size: 16px;
    }
    
    .section-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .clear-all-btn-compact {
        align-self: flex-end;
        min-width: 100px;
        font-size: 13px;
        padding: 8px 14px;
    }
}

.play-next-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.play-next-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.play-next-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Flash animation for play next button (3 times per second = ~333ms per cycle) */
.play-next-btn.flashing {
    animation: buttonFlash 0.333s ease-in-out infinite;
}

@keyframes buttonFlash {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

.clear-all-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.clear-all-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.clear-all-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Ride Session Section */
.ride-session-section {
    padding: 20px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    border-bottom: 1px solid #e9ecef;
}

.ride-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.ride-status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 500;
}

.ride-status-item i {
    font-size: 20px;
}

.ride-code-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.ride-code-label {
    font-size: 14px;
    opacity: 0.9;
}

.ride-code {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ride-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.start-ride-btn, .end-ride-btn, .enable-ride-id-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.start-ride-btn {
    background: #fff;
    color: #27ae60;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.start-ride-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.end-ride-btn {
    background: #e74c3c;
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.end-ride-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

.start-ride-btn:disabled, .end-ride-btn:disabled, .enable-ride-id-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.enable-ride-id-btn {
    background: #3498db;
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.enable-ride-id-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.enable-ride-id-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Ride ID Modal */
.ride-id-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    padding-bottom: 20px;
    box-sizing: border-box;
}

.ride-id-modal-content {
    background: white;
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 500px;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ride-id-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ride-id-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.ride-id-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #7f8c8d;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.ride-id-modal-close:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

.ride-id-display {
    margin-bottom: 20px;
}

.ride-id-display input {
    width: 100%;
    padding: 16px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    background: #f8f9fa;
    color: #2c3e50;
    box-sizing: border-box;
}

.ride-id-display input:focus {
    outline: none;
    border-color: #3498db;
    background: white;
}

.number-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.num-pad-btn {
    padding: 20px;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    background: white;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.num-pad-btn:hover {
    background: #f8f9fa;
    border-color: #3498db;
    transform: scale(1.05);
}

.num-pad-btn:active {
    transform: scale(0.95);
    background: #ecf0f1;
}

.num-pad-clear {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.num-pad-clear:hover {
    background: #c0392b;
    border-color: #c0392b;
}

.num-pad-submit {
    background: #27ae60;
    color: white;
    border-color: #27ae60;
    grid-column: span 1;
}

.num-pad-submit:hover {
    background: #229954;
    border-color: #229954;
}

.num-pad-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ride-id-modal-footer {
    display: flex;
    justify-content: center;
}

.ride-id-cancel-btn {
    padding: 12px 24px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ride-id-cancel-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* Send Note Section */
.send-note-section {
    margin-top: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.send-note-section h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.send-note-section h3 i {
    font-size: 16px;
}

.note-section-description {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 15px;
    color: white;
}

.note-buttons-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.send-note-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #27ae60;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 130px;
    justify-content: center;
}

.send-note-btn:hover:not(:disabled) {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.send-note-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.passenger-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 14px;
    color: white;
}

.passenger-count i {
    font-size: 16px;
}

.passenger-count-content {
    line-height: 1.4;
    white-space: nowrap;
}

.passenger-count-inactive {
    opacity: 0.8;
    display: inline;
}

.passenger-count span {
    font-weight: 600;
    display: inline;
}

/* Status Section */
.status-section {
    background: white;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.apple-music-status-card {
    margin-top: 15px;
    padding: 16px;
    border: 1px solid #edf0f7;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: #f9fbff;
}

.apple-music-status-info {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
    min-width: 220px;
}

.apple-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1c1c1d 0%, #4d4d4e 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.apple-text .label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8891a4;
    margin: 0;
}

.apple-text strong {
    display: block;
    font-size: 16px;
    color: #1f2533;
}

.apple-text span {
    font-size: 13px;
    color: #6b7287;
}

.apple-music-status-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.apple-signin-btn {
    border: 1px solid #0f1118;
    background: #0f1118;
    color: #ffffff;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.apple-signin-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.apple-status-pill {
    padding: 6px 14px;
    border-radius: 999px;
    background: #e8ebfb;
    color: #3b3f56;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.apple-status-pill.connected {
    background: #dbf7e8;
    color: #1d8a4f;
}

.apple-status-pill.unavailable {
    background: #fde2e1;
    color: #c53030;
}

.apple-refresh-btn {
    border: 1px solid #d6dbed;
    background: white;
    color: #55607a;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.apple-refresh-btn:hover {
    background: #eef2ff;
    color: #3b46a6;
    border-color: #c5cdef;
}

/* Playback Device Card */
.playback-device-card {
    margin: 20px 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #edf0f7;
    box-shadow: 0 5px 20px rgba(15, 22, 36, 0.05);
}

.device-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.device-label {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: #9aa0c2;
    margin: 0;
}

.device-header h3 {
    margin: 2px 0 0;
    font-size: 20px;
    color: #1f2533;
}

.device-host-pill {
    background: #e4e8ff;
    color: #2f3aa6;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.device-host-pill.inactive {
    background: #f1f2f7;
    color: #8a8fa6;
}

.device-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.device-option {
    display: flex;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e7e9f5;
    border-radius: 12px;
    cursor: pointer;
}

.device-option input {
    margin-top: 4px;
}

.device-option strong {
    display: block;
    color: #1f2533;
}

.device-option p {
    margin: 2px 0 0;
    color: #6b738f;
    font-size: 13px;
}

.device-actions {
    display: flex;
    gap: 10px;
}

.device-actions .btn-secondary {
    background: #f8f9fd;
    color: #4e5671;
    border: 1px solid #dfe3f4;
}

/* Playback Device panel: pill-only mode (keep just Host pill visible) */
.playback-device-card.pill-only {
    padding: 10px 14px;
    margin: 12px 0;
}

.playback-device-card.pill-only .device-body,
.playback-device-card.pill-only .device-actions {
    display: none;
}

.playback-device-card.pill-only .device-header {
    margin-bottom: 0;
}

.playback-device-card.pill-only .device-header > div {
    display: none;
}

/* Admin Player */
.admin-player-video {
    position: sticky;
    bottom: 88px;
    width: 100%;
    max-height: 240px;
    overflow: hidden;
    background: #0f1220;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: none;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 14;
}

.admin-player-video video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-player-video.active {
    opacity: 1;
}

/* Video preview visible when active */

.admin-player {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 24, 38, 0.95);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    z-index: 15;
}

.player-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.player-artwork {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    flex-shrink: 0;
}

.player-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.player-title {
    font-weight: 600;
    font-size: 15px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-artist {
    font-size: 13px;
    color: #cbd2ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-status-text {
    font-size: 12px;
    color: #8ea0ff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.player-status-text.ok {
    color: #6fffb8;
}

.player-status-text.warn {
    color: #ffcd5d;
}

.player-status-text.error {
    color: #ff7b7b;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.player-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
    font-size: 16px;
}

.player-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.25);
}

.player-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 768px) {
    .admin-player {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .player-controls {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Search Section */
.search-section {
    background: white;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.search-container {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 25px;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-icon {
    color: #7f8c8d;
    font-size: 18px;
    margin-right: 12px;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #2c3e50;
    outline: none;
    font-family: 'Poppins', sans-serif;
}

.search-input::placeholder {
    color: #95a5a6;
}

.clear-search-btn {
    background: transparent;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    margin-left: 10px;
}

.clear-search-btn:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #7f8c8d;
    font-size: 14px;
}

.loading-indicator i {
    font-size: 18px;
}

.search-results {
    margin-top: 15px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.results-list {
    padding: 10px;
}

.result-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.result-item:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

.result-item:last-child {
    margin-bottom: 0;
}

.result-item .album-art {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-item .song-info {
    flex: 1;
    min-width: 0;
}

.result-item .song-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #2c3e50;
}

.result-item .song-artist {
    color: #7f8c8d;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.add-btn, .remove-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    margin-left: 10px;
}

.add-btn {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

.remove-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.remove-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.queue-status {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    color: #2c3e50;
}

.status-item i {
    font-size: 18px;
    color: #3498db;
}

/* Now Playing Section */
.now-playing {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 20px;
    margin: 0;
}

.now-playing h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 18px;
}

.current-song {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
}

.current-song .album-art {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
}

.current-song .song-info {
    flex: 1;
}

.current-song .song-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.current-song .song-artist {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.now-playing-progress {
    margin-top: 8px;
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-bar {
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 30px;
    opacity: 0.85;
    font-weight: 500;
}

.current-time,
.total-time {
    font-variant-numeric: tabular-nums;
}

/* Queue Section */
.queue-section {
    background: white;
    flex: 1;
    padding: 20px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    padding-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #ecf0f1;
    margin-bottom: 20px;
}

.empty-queue {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-queue i {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-queue p {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-queue .subtitle {
    font-size: 14px;
    opacity: 0.8;
}

/* Admin Queue List */
.admin-queue-list {
    border-radius: 12px;
    overflow: hidden;
}

.admin-queue-item {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
    position: relative;
}

.admin-queue-item:last-child {
    border-bottom: none;
}

.admin-queue-item:hover {
    background: #e9ecef;
}

.admin-queue-item.next-to-play {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(46, 204, 113, 0.1) 100%);
    border-left: 4px solid #27ae60;
}

.queue-position {
    font-size: 18px;
    font-weight: 600;
    color: #3498db;
    min-width: 40px;
    text-align: center;
    margin-right: 15px;
}

.next-to-play .queue-position {
    color: #27ae60;
}

.admin-queue-item .album-art {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-queue-item .song-info {
    flex: 1;
    min-width: 0;
}

.admin-queue-item .song-title {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-queue-item .song-artist {
    color: #7f8c8d;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-remove-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.admin-remove-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
}

.toast.success {
    background: rgba(39, 174, 96, 0.9);
}

.toast.error {
    background: rgba(231, 76, 60, 0.9);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-container {
        max-width: 100%;
    }
    
    .controls-bar {
        flex-direction: column;
    }
    
    .play-next-btn, .clear-all-btn {
        width: 100%;
    }
    
    .queue-status {
        flex-direction: column;
        gap: 10px;
    }
    
    .admin-queue-item {
        padding: 15px;
    }
    
    .admin-queue-item .song-title {
        font-size: 16px;
    }
}

@media (min-width: 801px) {
    .admin-container {
        border-radius: 20px;
        margin: 20px auto;
        min-height: calc(100vh - 40px);
    }
}

/* Loading animation */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Auto-refresh indicator */
.refresh-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #3498db;
    font-size: 12px;
    opacity: 0.7;
}

.refresh-indicator.active {
    color: #27ae60;
    opacity: 1;
}
