/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
}

.min-vh-100 {
    min-height: 100vh;
}

/* ===== ANIMATIONS ===== */
@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

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

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ===== HOME PAGE ===== */
.title-glow {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 800;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5), 0 0 40px rgba(255, 255, 255, 0.3);
    letter-spacing: 2px;
    animation: pulse 2s ease-in-out infinite;
}

.role-btn {
    transform: translateY(0);
    transition: all 0.3s ease;
    font-size: clamp(0.9rem, 2vw, 1.3rem);
    font-weight: 600;
    padding: clamp(1rem, 3vw, 2rem) clamp(1.5rem, 4vw, 3rem);
    border: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.role-btn:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3) !important;
    color: white !important;
}

/* ===== PAGE TITLE ===== */
.page-title {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

/* ===== TV SCREEN STYLES ===== */
.now-playing-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.5s ease;
}

.song-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.queue-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border-left: 4px solid #667eea;
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    padding: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 1rem;
    animation: slideUp 0.5s ease forwards;
}

.queue-item:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    border-left-color: #f093fb;
}

.queue-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: white;
    flex-shrink: 0;
    margin-right: 1rem;
}

/* ===== CONTROLLER STYLES ===== */
.search-container {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(240, 147, 251, 0.1));
    border-radius: 20px;
    padding: clamp(20px, 4vw, 30px);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(102, 126, 234, 0.3);
}

.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(102, 126, 234, 0.5);
    color: white;
    border-radius: 12px;
    padding: clamp(10px, 2vw, 12px) clamp(12px, 2.5vw, 16px);
    font-size: clamp(0.85rem, 2vw, 1rem);
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #667eea;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.3);
    color: white;
}

.search-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: clamp(10px, 2vw, 12px) clamp(20px, 3vw, 30px);
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.result-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    padding: clamp(1rem, 3vw, 1.5rem);
    margin-bottom: 1.5rem;
    animation: slideUp 0.5s ease forwards;
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.request-btn {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white;
    padding: clamp(8px, 1.5vw, 10px) clamp(15px, 2.5vw, 20px);
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
}

.request-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(245, 87, 108, 0.3);
    color: white;
}

.request-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== SEARCH RESULTS GRID ===== */
.search-results-grid {
    display: flex;
    flex-direction: column;
    gap: clamp(6px, 1.5vw, 10px);
    margin-top: 15px;
}

.video-card {
    background: rgba(20, 20, 30, 0.8);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    align-items: center;
    gap: clamp(6px, 1.5vw, 10px);
    padding: clamp(4px, 1vw, 6px);
}

@media (max-width: 600px) {
    .video-card {
        flex-wrap: wrap;
    }
}

.video-card:hover {
    transform: translateX(3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

@media (max-width: 600px) {
    .video-card:hover {
        transform: translateY(2px);
    }
}

.video-thumbnail {
    position: relative;
    width: clamp(60px, 12vw, 90px);
    height: clamp(34px, 6.75vw, 51px);
    background: #000;
    overflow: hidden;
    border-radius: 6px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .video-thumbnail {
        width: 60px;
        height: 34px;
    }
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: none;
}

.video-card:hover .video-overlay {
    display: none;
}

.select-btn {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    padding: clamp(4px, 1vw, 6px) clamp(10px, 2vw, 14px);
    border-radius: 4px;
    font-weight: 600;
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 600px) {
    .select-btn {
        padding: 4px 10px;
        font-size: 0.75rem;
    }
}

.select-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.5);
}

.select-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.video-info {
    padding: clamp(1px, 0.5vw, 2px);
    background: transparent;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

@media (max-width: 600px) {
    .video-info {
        flex-basis: 100%;
        order: 3;
        width: 100%;
    }
}

.video-title {
    color: #fff;
    margin: 0 0 clamp(1px, 0.3vw, 2px) 0;
    font-size: clamp(0.8rem, 1.8vw, 0.85rem);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 600px) {
    .video-title {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}

.video-artist {
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-size: clamp(0.7rem, 1.5vw, 0.75rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 600px) {
    .video-artist {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}

/* ===== LOADING STATE ===== */
.spinner-border {
    color: #667eea !important;
}

/* ===== ALERTS ===== */
.alert-custom {
    background: rgba(255, 193, 7, 0.1);
    border: 2px solid rgba(255, 193, 7, 0.5);
    border-radius: 15px;
    color: #ffc107;
    padding: 1.5rem;
    margin-top: 1rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .title-glow {
        font-size: 2.5rem;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .role-btn {
        padding: 1.5rem 2rem;
        font-size: 1rem;
    }

    .song-title {
        font-size: 1.8rem;
    }

    .search-container {
        padding: 20px;
    }

    .queue-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .queue-number {
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
}

/* ===== UTILITY CLASSES ===== */
.fw-600 {
    font-weight: 600;
}

.text-gradient {
    background: linear-gradient(135deg, #667eea, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== STAT CARDS ===== */
.stat-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(240, 147, 251, 0.1));
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 15px;
    padding: clamp(1rem, 3vw, 1.5rem);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.stat-number {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Extra Large Desktop (1440px+) */
@media (min-width: 1440px) {
    .page-title {
        font-size: 2.5rem;
    }

    .search-container {
        padding: 35px;
    }

    .form-control {
        padding: 14px 18px;
        font-size: 1.05rem;
    }

    .stat-card {
        padding: 20px;
    }

    .song-list {
        grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    }
}

/* Large Desktop (1024px - 1439px) */
@media (min-width: 1024px) and (max-width: 1439px) {
    .page-title {
        font-size: 2rem;
    }

    .search-container {
        padding: 28px;
    }

    .form-control {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .stat-card {
        padding: 18px;
    }

    .song-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Tablets (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .page-title {
        font-size: 1.6rem;
    }

    .search-container {
        padding: 20px;
    }

    .form-control {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .control-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    .stat-card {
        padding: 15px;
    }

    .song-list {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 15px;
    }

    .player-controls {
        padding: 18px;
        margin-bottom: 25px;
    }

    .player-controls-row {
        gap: 10px;
    }

    .user-display {
        font-size: 1rem;
    }
}

/* Small Phones (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .page-title {
        font-size: 1.3rem;
    }

    .search-container {
        padding: 15px;
    }

    .form-control {
        padding: 9px 12px;
        font-size: 0.85rem;
    }

    .control-btn {
        padding: 7px 11px;
        font-size: 0.75rem;
    }

    .stat-card {
        padding: 12px;
    }

    .song-list {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .player-controls {
        padding: 15px;
        margin-bottom: 20px;
    }

    .player-controls-row {
        gap: 8px;
    }

    .user-display {
        font-size: 0.9rem;
    }
}

/* Extra Small Phones (max 480px) */
@media (max-width: 480px) {
    .page-title {
        font-size: 1.1rem;
    }

    .search-container {
        padding: 12px;
    }

    .form-control {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .control-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .stat-card {
        padding: 10px;
    }

    .song-list {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .player-controls {
        padding: 12px;
        margin-bottom: 15px;
    }

    .player-controls-row {
        gap: 6px;
    }

    .user-display {
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.7rem;
    }
}

    /* TV Display */
    .now-playing-card {
        padding: 20px !important;
    }

    .song-title-large {
        font-size: 2.5rem !important;
    }

    .song-artist-large {
        font-size: 1.3rem !important;
    }

    .song-singer-large {
        font-size: 1rem !important;
    }

    .sing-now-text {
        font-size: 1.8rem !important;
    }

    .sing-now-mic {
        font-size: 1.8rem !important;
    }

    .singer-name-display {
        font-size: 2rem !important;
        gap: 10px;
    }

    .mic-icon {
        font-size: 2rem !important;
    }

    .center-singer-name {
        top: 45%;
    }

    .sing-now-header {
        top: 20px;
    }

    .reserve-item-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .reserve-item-title {
        font-size: 0.75rem;
    }

    .reserve-item-artist {
        font-size: 0.65rem;
    }

    .reserve-item-singer {
        font-size: 0.6rem;
    }

    .control-btn {
        padding: 10px 14px;
        font-size: 0.75rem;
    }

    #fullscreenBtn {
        padding: 10px 14px !important;
        font-size: 0.9rem !important;
        top: 15px !important;
        right: 130px !important;
    }

    /* Delete Queue Button */
    button[onclick="deleteQueue()"] {
        top: 15px !important;
        right: 15px !important;
        padding: 10px 14px !important;
        font-size: 0.9rem !important;
    }

    .video-info-overlay {
        padding: 20px 30px !important;
    }

    .video-song-title {
        font-size: 1.5rem !important;
    }

    .video-song-artist {
        font-size: 1rem !important;
    }

    .video-song-singer {
        font-size: 0.8rem !important;
    }

/* Small Mobile Phones */
@media (max-width: 480px) {
    .page-title {
        font-size: 1.3rem !important;
    }

    .lead {
        font-size: 0.95rem !important;
    }

    .role-btn {
        padding: 20px 10px !important;
    }

    .role-btn div:first-child {
        font-size: 2rem !important;
    }

    .d-flex {
        flex-direction: column !important;
    }

    .gap-5 {
        gap: 1.5rem !important;
    }

    .player-controls-box {
        width: 100%;
    }

    .control-btn {
        font-size: 0.7rem;
        padding: 6px 10px;
        min-width: 55px;
    }

    .user-display {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .song-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
    }

    .song-item {
        padding: 10px !important;
    }

    .search-container {
        padding: 12px !important;
    }

    .form-control {
        padding: 0.4rem 0.75rem;
        font-size: 0.9rem;
    }

    .form-label {
        font-size: 0.9rem !important;
    }

    .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
}

/* ===== QUEUE STYLING ===== */
.queue-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    font-size: 18px;
}

.queue-item .num {
    opacity: 0.5;
    width: 24px;
}

.queue-item .title {
    flex: 1;
    font-weight: 600;
}

.queue-item .name {
    opacity: 0.7;
}
