/* Reset ve temel stiller */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Telegram WebApp tema renkleri (default) */
    --tg-theme-bg-color: #ffffff;
    --tg-theme-text-color: #000000;
    --tg-theme-hint-color: #999999;
    --tg-theme-button-color: #2481cc;
    --tg-theme-button-text-color: #ffffff;
    
    /* Modern Design System Variables */
    --card-height: 90px;
    --card-radius: 16px;
    --card-gap: 1.25rem;
    --card-padding: 1.25rem;
    
    --thumbnail-width: 80px;
    --thumbnail-height: 60px;
    --thumbnail-radius: 12px;
    
    --button-size: 52px;
    --button-radius: 50%;
    
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-gradient: linear-gradient(135deg, #ff6b6b 0%, #ffa726 100%);
    --card-gradient-1: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.08) 100%);
    --card-gradient-2: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.05) 100%);
    
    --text-primary: rgba(255, 255, 255, 0.95);
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-muted: rgba(255, 255, 255, 0.5);
    
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.2);
    
    --border-light: rgba(255, 255, 255, 0.15);
    --border-lighter: rgba(255, 255, 255, 0.1);
    
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #4facfe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Telegram WebApp body için özel stiller */
body.tg-webapp {
    background: var(--tg-theme-bg-color);
    color: var(--tg-theme-text-color);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Telegram info bar */
.telegram-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(36, 129, 204, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(36, 129, 204, 0.2);
    padding: 8px 1rem;
    font-size: 14px;
}

.telegram-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.telegram-badge {
    background: var(--tg-theme-button-color, #2481cc);
    color: var(--tg-theme-button-text-color, #ffffff);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.telegram-badge i {
    margin-right: 4px;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    backdrop-filter: blur(10px);
}

/* Header */
.header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.header h1 {
    font-size: 2rem;
    background: linear-gradient(45deg, #ff6b6b, #ffa726, #66bb6a, #42a5f5);
    background-size: 300% 300%;
    animation: gradientText 3s ease infinite;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    text-shadow: 0 0 30px rgba(255, 107, 107, 0.5);
}

@keyframes gradientText {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.header h1 i {
    margin-right: 0.8rem;
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8));
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    padding: 0.8rem;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.search-container:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.search-container:focus-within {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3);
}

#searchInput {
    background: transparent;
    border: none;
    color: #fff;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    width: 350px;
    outline: none;
    font-weight: 500;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

#searchBtn {
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    border: none;
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

#searchBtn:hover {
    background: linear-gradient(45deg, #ff5252, #ff9800);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

#searchBtn:active {
    transform: translateY(0);
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 2rem;
    gap: 2rem;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2rem;
    height: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 120px;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 1rem;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 1rem 1.2rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.3), rgba(255, 167, 38, 0.3));
    transition: left 0.3s ease;
    z-index: -1;
}

.nav-menu a:hover::before {
    left: 0;
}

.nav-menu a:hover {
    transform: translateX(10px);
    color: #fff;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.2);
}

.nav-menu i {
    margin-right: 1rem;
    width: 20px;
    font-size: 1.1rem;
}

.user-playlists {
    margin-top: 2.5rem;
}

.user-playlists h3 {
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 1.2rem;
}

#createPlaylistBtn {
    background: linear-gradient(45deg, #ff6b6b, #ffa726, #66bb6a);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    border: none;
    color: #fff;
    padding: 1rem 1.2rem;
    border-radius: 15px;
    cursor: pointer;
    width: 100%;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
}

#createPlaylistBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 107, 0.4);
}

/* Content Area */
.content-area {
    flex: 1;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.search-results h2 {
    margin-bottom: 2.5rem;
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
}

.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    margin-bottom: 2rem;
}

/* Modern Music Card Component */
.music-card {
    /* Layout & Structure */
    display: grid;
    grid-template-columns: var(--thumbnail-width) 1fr auto;
    grid-template-areas: "thumbnail content actions";
    gap: var(--card-gap);
    align-items: center;
    
    /* Fixed Dimensions */
    height: var(--card-height);
    padding: var(--card-padding);
    
    /* Visual Design */
    background: var(--card-gradient-1);
    backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid var(--border-light);
    border-radius: var(--card-radius);
    
    /* Interactive States */
    cursor: pointer;
    transition: var(--transition-slow);
    
    /* Glassmorphism Effect */
    box-shadow: 
        var(--shadow-md),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    
    /* Position */
    position: relative;
    margin-bottom: var(--card-gap);
    width: 100%;
    box-sizing: border-box;
}

.music-card:nth-child(even) {
    background: var(--card-gradient-2);
}

.music-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        var(--shadow-lg),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.25);
}

.music-card:active {
    transform: translateY(-2px) scale(0.99);
}

/* Thumbnail Section */
.music-card__thumbnail {
    grid-area: thumbnail;
    width: var(--thumbnail-width);
    height: var(--thumbnail-height);
    border-radius: var(--thumbnail-radius);
    overflow: hidden;
    position: relative;
    
    /* Shadow & Border */
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--border-lighter);
}

.music-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.music-card:hover .music-card__thumbnail img {
    transform: scale(1.05);
}

/* Content Section */
.music-card__content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
    min-width: 0; /* For text truncation */
}

.music-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    
    /* Text Truncation */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* Typography */
    letter-spacing: -0.01em;
    font-feature-settings: "kern" 1;
    margin: 0;
}

.music-card__artist {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.2;
    
    /* Text Truncation */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.music-card__metadata {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.2rem;
}

.music-card__stat {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.music-card__stat-icon {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Actions Section */
.music-card__actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.music-card__play-btn {
    width: var(--button-size);
    height: var(--button-size);
    border-radius: var(--button-radius);
    border: none;
    
    /* Visual Design */
    background: var(--primary-gradient);
    color: white;
    font-size: 1.2rem;
    
    /* Layout */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* Interactive */
    cursor: pointer;
    transition: var(--transition-smooth);
    
    /* Shadow */
    box-shadow: 
        0 4px 16px rgba(102, 126, 234, 0.35),
        0 1px 3px rgba(0, 0, 0, 0.2);
    
    /* Border */
    border: 2px solid var(--border-lighter);
}

.music-card__play-btn:hover {
    transform: scale(1.08);
    box-shadow: 
        0 6px 20px rgba(102, 126, 234, 0.45),
        0 2px 8px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.music-card__play-btn:active {
    transform: scale(1.02);
}

.music-card__play-btn--playing {
    background: var(--accent-gradient);
    box-shadow: 
        0 4px 16px rgba(255, 107, 107, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.2);
}

.music-card__play-btn--playing:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff9800 100%);
    box-shadow: 
        0 6px 20px rgba(255, 107, 107, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

/* List Container */
.music-list {
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
    padding: 1rem 0;
}

/* Mobile Responsive for Music Cards */
@media (max-width: 768px) {
    .music-card {
        --card-height: 80px;
        --card-padding: 1rem;
        --thumbnail-width: 70px;
        --thumbnail-height: 52px;
        --button-size: 48px;
        gap: 1rem;
    }
    
    .music-card__title {
        font-size: 1rem;
    }
    
    .music-card__artist {
        font-size: 0.85rem;
    }
    
    .music-card__stat {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .music-card {
        --card-height: 70px;
        --card-padding: 0.875rem;
        --thumbnail-width: 60px;
        --thumbnail-height: 45px;
        --button-size: 42px;
        gap: 0.875rem;
    }
    
    .music-card__title {
        font-size: 0.95rem;
    }
    
    .music-card__artist {
        font-size: 0.8rem;
    }
    
    .music-card__metadata {
        gap: 0.75rem;
    }
}

/* Animation improvements */
@keyframes musicCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.music-card {
    animation: musicCardFadeIn 0.4s ease forwards;
    opacity: 0;
}

/* Focus improvements */
.music-card:focus-visible,
.music-card__play-btn:focus-visible {
    outline: 3px solid rgba(102, 126, 234, 0.8);
    outline-offset: 2px;
}

/* Loading state */
.music-card--loading {
    pointer-events: none;
    opacity: 0.7;
}

.music-card--loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.1) 50%, 
        transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.song-card {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    padding: 1.5rem;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
    min-height: 90px;
    max-height: 90px;
    width: 100%;
    box-sizing: border-box;
}

.song-card:nth-child(even) {
    background: rgba(255, 255, 255, 0.08);
}

.song-card:nth-child(odd) {
    background: rgba(255, 255, 255, 0.12);
}

.song-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.song-card:hover::before {
    opacity: 1;
}

.song-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.25);
}

.song-card:hover .song-card-thumbnail {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.song-card.active {
    background: rgba(102, 126, 234, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    transform: translateX(5px);
}

.song-card.active::before {
    opacity: 1;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
}

.song-card-thumbnail {
    width: 78px;
    height: 58px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.song-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.song-card:hover .song-card-thumbnail img {
    transform: scale(1.05);
}

.song-card-info {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    padding-right: 1rem;
    height: 100%;
}

.song-card-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #ffffff;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.song-card-artist {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-card-stats {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-top: 0.1rem;
    position: absolute;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.song-card-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}

.song-card-stats i {
    font-size: 0.65rem;
    opacity: 0.7;
    color: rgba(255, 255, 255, 0.4);
}

.song-card-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 3;
    flex-shrink: 0;
}

.play-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
    flex-shrink: 0;
    position: relative;
    z-index: 3;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.play-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

.play-btn.playing {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa726 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.play-btn.playing:hover {
    background: linear-gradient(135deg, #ff5252 0%, #ff9800 100%);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.5);
}

/* Grid Layout - Modern organized list */
.songs-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem 0;
}

/* Now Playing */
.now-playing {
    margin-top: 3rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.current-song-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.song-thumbnail img {
    width: 100px;
    height: 100px;
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.song-thumbnail img:hover {
    transform: scale(1.05);
}

.song-details h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.song-details p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 500;
}

/* Player */
.player {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(25px);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: sticky;
    bottom: 0;
    z-index: 1000;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.player-controls button {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.player-controls button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.player-controls button:hover::before {
    width: 100%;
    height: 100%;
}

.player-controls button:hover {
    transform: scale(1.1);
    color: #ff6b6b;
}

#playPauseBtn {
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    font-size: 1.8rem;
    padding: 1.2rem;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.4);
}

#playPauseBtn:hover {
    background: linear-gradient(45deg, #ff5252, #ff9800);
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.5);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    margin: 0 3rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(255, 107, 107, 0.3), rgba(255, 167, 38, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-bar:hover::before {
    opacity: 1;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffa726, #66bb6a);
    width: 0%;
    transition: width 0.1s ease;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.5);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.volume-bar {
    width: 100px;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
}

.volume-level {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffa726);
    width: 50%;
    border-radius: 4px;
    transition: width 0.2s ease;
}

.player-options {
    display: flex;
    gap: 1.5rem;
}

.player-options button {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.8rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.player-options button:hover,
.player-options button.active {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
    transform: scale(1.1);
}

/* Loading, Error ve No Results */
.loading,
.error,
.no-results {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading::before {
    content: '';
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.error {
    color: #ff5252;
    background: rgba(255, 82, 82, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 82, 82, 0.3);
}

.no-results {
    color: rgba(255, 255, 255, 0.8);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #ff5252, #ff9800);
}

/* Selection Styling */
::selection {
    background: rgba(255, 107, 107, 0.3);
    color: #fff;
}

/* Focus Styling */
button:focus,
input:focus {
    outline: 2px solid rgba(255, 107, 107, 0.5);
    outline-offset: 2px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
    backdrop-filter: blur(20px);
    margin: 10% auto;
    padding: 3rem;
    border-radius: 25px;
    width: 90%;
    max-width: 500px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #fff;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: scale(1.1);
}

.modal-content h2 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
}

#playlistNameInput {
    width: 100%;
    padding: 1.5rem;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    margin: 1.5rem 0;
    backdrop-filter: blur(10px);
    font-size: 1.1rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

#playlistNameInput:focus {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.3);
}

#playlistNameInput::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#savePlaylistBtn {
    background: linear-gradient(45deg, #ff6b6b, #ffa726);
    color: #fff;
    border: none;
    padding: 1.5rem 2.5rem;
    border-radius: 15px;
    cursor: pointer;
    width: 100%;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 107, 107, 0.3);
}

#savePlaylistBtn:hover {
    background: linear-gradient(45deg, #ff5252, #ff9800);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 107, 107, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .sidebar {
        width: 240px;
    }

    .results-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {

    /* Android Material Design Layout */
    body {
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    .app-container {
        display: flex;
        flex-direction: column;
        height: 100vh;
        max-height: 100vh;
    }

    .header {
        flex-shrink: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
        padding: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .header-content {
        max-width: 100%;
    }

    .header h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        text-align: center;
        color: white;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    }

    .search-container {
        position: relative;
        max-width: 100%;
        margin: 0;
    }

    .search-container input {
        width: 100%;
        height: 48px;
        border: none;
        border-radius: 24px;
        padding: 0 60px 0 20px;
        font-size: 16px;
        background: rgba(255, 255, 255, 0.95);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(10px);
    }

    .search-container button {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: linear-gradient(135deg, #f093fb, #f5576c);
        color: white;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .main-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        padding: 0;
        gap: 0;
    }

    .sidebar {
        width: 100%;
        position: relative;
        top: auto;
        background: rgba(255, 255, 255, 0.95);
        padding: 1rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        flex-shrink: 0;
    }

    .nav-menu ul {
        display: flex;
        justify-content: space-around;
        margin: 0;
        padding: 0;
        gap: 0.5rem;
    }

    .nav-menu li {
        flex: 1;
    }

    .nav-menu a {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.5rem;
        border-radius: 12px;
        text-decoration: none;
        color: #666;
        font-size: 0.8rem;
        transition: all 0.2s ease;
    }

    .nav-menu a i {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
        transform: translateY(-1px);
    }

    .results-container {
        flex: 1;
        overflow-y: auto;
        padding: 1rem;
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
        -webkit-overflow-scrolling: touch;
    }

    .search-results .result-item {
        background: rgba(255, 255, 255, 0.95);
        border-radius: 16px;
        padding: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        transition: all 0.3s ease;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .search-results .result-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    }

    .search-results .result-item:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .search-results .result-item img {
        width: 60px;
        height: 60px;
        border-radius: 12px;
        object-fit: cover;
        flex-shrink: 0;
    }

    .search-results .result-info {
        flex: 1;
        min-width: 0;
    }

    .search-results .result-title {
        font-weight: 600;
        font-size: 0.9rem;
        margin-bottom: 0.25rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .search-results .result-channel {
        font-size: 0.8rem;
        color: #666;
        margin-bottom: 0.25rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .search-results .result-duration {
        font-size: 0.7rem;
        color: #999;
    }

    /* Mobile touch improvements */
    .search-container button,
    .player-controls button,
    .volume-control button {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    .search-container button:active,
    .player-controls button:active,
    .volume-control button:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }

    /* Android Material Player */
    .player {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(145deg, rgba(0, 0, 0, 0.95), rgba(20, 20, 20, 0.95));
        backdrop-filter: blur(20px);
        padding: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 1000;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }

    .player-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 0.5rem;
    }

    .current-song-mini {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        flex: 1;
        min-width: 0;
    }

    .mini-thumbnail {
        width: 40px;
        height: 40px;
        border-radius: 8px;
        object-fit: cover;
        display: none;
    }

    .mini-info {
        flex: 1;
        min-width: 0;
    }

    .mini-info div {
        font-size: 0.8rem;
        color: white;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    #currentTitleMini {
        font-weight: 600;
        margin-bottom: 0.125rem;
    }

    #currentArtistMini {
        color: #bbb;
        font-size: 0.7rem;
    }

    .mini-controls button {
        width: 40px;
        height: 40px;
        border-radius: 20px;
        background: linear-gradient(135deg, #f093fb, #f5576c);
        border: none;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(240, 147, 251, 0.4);
    }

    .progress-container {
        margin-bottom: 0.75rem;
    }

    .progress-bar {
        background: rgba(255, 255, 255, 0.2);
        height: 4px;
        border-radius: 2px;
        overflow: hidden;
        margin-bottom: 0.5rem;
    }

    .progress {
        background: linear-gradient(90deg, #f093fb, #f5576c);
        height: 100%;
        transition: width 0.1s ease;
        border-radius: 2px;
    }

    .time-display {
        display: flex;
        justify-content: space-between;
        font-size: 0.7rem;
        color: #bbb;
    }

    .player-controls {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
    }

    .player-controls button {
        width: 44px;
        height: 44px;
        border-radius: 22px;
        border: none;
        background: rgba(255, 255, 255, 0.1);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        backdrop-filter: blur(10px);
    }

    .player-controls #playPauseBtn {
        width: 56px;
        height: 56px;
        border-radius: 28px;
        background: linear-gradient(135deg, #667eea, #764ba2);
        font-size: 1.2rem;
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    }

    .player-controls button:active {
        transform: scale(0.9);
    }

    .player-controls button.active {
        background: linear-gradient(135deg, #f093fb, #f5576c);
        box-shadow: 0 2px 8px rgba(240, 147, 251, 0.4);
    }

    /* Add bottom padding to avoid overlap with fixed player */
    .results-container {
        padding-bottom: 120px;
    }

    /* Improved scroll behavior */
    .search-results {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    .header-content {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem 0;
    }

    .header h1 {
        font-size: 1.8rem;
    }

    #searchInput {
        width: 280px;
    }

    .results-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .song-card {
        max-width: 400px;
        margin: 0 auto;
    }

    .player {
        flex-wrap: wrap;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }

    .progress-container {
        order: 3;
        width: 100%;
        margin: 0;
    }

    .player-controls {
        gap: 1rem;
    }

    .volume-container {
        flex-shrink: 0;
    }

    .content-area {
        padding: 2rem;
    }

    .current-song-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .modal-content {
        width: 95%;
        padding: 2rem;
        margin: 20% auto;
    }
}

/* Enhanced Mobile-First Responsive Design */

/* Extra Small screens (phones) */
@media (max-width: 480px) {
    body {
        overflow-x: hidden;
    }

    .app-container {
        flex-direction: column;
        height: 100vh;
        position: relative;
    }

    /* Fixed Header for Mobile */
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        padding: 1rem;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .header h1 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
        text-align: center;
        background: linear-gradient(45deg, #667eea, #764ba2, #f093fb);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .search-container {
        display: flex;
        gap: 0.5rem;
        margin: 0;
    }

    #searchInput {
        flex: 1;
        font-size: 16px;
        /* Prevent zoom on iOS */
        padding: 0.75rem 1rem;
        border-radius: 25px;
        border: 2px solid rgba(255, 255, 255, 0.2);
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        backdrop-filter: blur(10px);
    }

    #searchBtn {
        padding: 0.75rem 1rem;
        border-radius: 25px;
        min-width: 50px;
        font-size: 1rem;
    }

    /* Collapsible Sidebar for Mobile */
    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        max-height: 50vh;
        overflow-y: auto;
        z-index: 999;
        transform: translateY(calc(100% - 50px));
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 20px 20px 0 0;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
    }

    .sidebar.expanded {
        transform: translateY(0);
    }

    /* Drag handle for sidebar */
    .sidebar::before {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: rgba(255, 255, 255, 0.5);
        border-radius: 2px;
        cursor: pointer;
    }

    /* Main content area */
    .content-area {
        margin-top: 130px;
        /* Space for fixed header */
        margin-bottom: 160px;
        /* Space for bottom player + sidebar */
        padding: 1rem;
        overflow-y: auto;
        flex: 1;
    }

    /* Songs Grid - Single Column on Mobile */
    .songs-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .song-card {
        min-height: 90px;
        padding: 1rem;
        border-radius: 15px;
        display: flex;
        align-items: center;
        gap: 1rem;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
    }

    .song-card.active {
        background: rgba(102, 126, 234, 0.3);
        border-color: rgba(102, 126, 234, 0.5);
        box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
    }

    .song-card-thumbnail {
        width: 60px;
        height: 45px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .song-card-info {
        flex: 1;
        min-width: 0;
    }

    .song-card-info h3 {
        font-size: 0.9rem;
        line-height: 1.3;
        margin-bottom: 0.3rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .song-card-info p,
    .song-card-title {
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 0.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .song-card-artist {
        font-size: 0.75rem;
        opacity: 0.8;
        margin-bottom: 0.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .song-card-stats {
        font-size: 0.65rem;
        opacity: 0.7;
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
        margin-top: 0.1rem;
    }

    .song-card-stats span {
        white-space: nowrap;
    }

    .song-card-stats i {
        font-size: 0.6rem;
        opacity: 0.8;
        margin-right: 0.2rem;
    }

    .play-btn {
        width: 45px !important;
        height: 45px !important;
        font-size: 1rem !important;
        min-width: 45px;
        border-radius: 50%;
        background: linear-gradient(45deg, #667eea, #764ba2);
        color: #fff;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile Player - Bottom Fixed */
    .player {
        position: fixed;
        bottom: 50px;
        /* Above sidebar handle */
        left: 0;
        right: 0;
        padding: 1rem;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        z-index: 1001;
    }

    .player-info {
        margin-bottom: 1rem;
        text-align: center;
    }

    .player-info h3 {
        font-size: 0.95rem;
        margin-bottom: 0.2rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .player-info p {
        font-size: 0.8rem;
        opacity: 0.8;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .player-controls {
        gap: 1.5rem;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .player-controls button {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    .player-controls .play-pause-btn {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
        background: linear-gradient(45deg, #667eea, #764ba2);
    }

    .progress-container {
        margin-bottom: 0.5rem;
    }

    .progress-bar {
        height: 4px;
        border-radius: 2px;
        cursor: pointer;
        background: rgba(255, 255, 255, 0.2);
        touch-action: none;
    }

    .progress-fill {
        height: 100%;
        border-radius: 2px;
        background: linear-gradient(45deg, #667eea, #764ba2);
        transition: width 0.1s ease;
    }

    /* Navigation Menu - Mobile */
    .nav-menu {
        padding: 0.5rem 1rem 1rem;
    }

    .nav-menu a {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 12px;
        margin-bottom: 0.3rem;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-height: 45px;
        transition: all 0.3s ease;
    }

    .nav-menu i {
        margin-right: 0.75rem;
        width: 20px;
        font-size: 1.1rem;
    }

    .user-playlists {
        margin-top: 1rem;
        padding: 0 1rem;
    }

    .user-playlists h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    #createPlaylistBtn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        border-radius: 12px;
        min-height: 45px;
        width: 100%;
        margin-bottom: 1rem;
    }

    /* Loading and Error States */
    .loading {
        font-size: 0.9rem;
        padding: 2rem;
        text-align: center;
    }

    .error {
        margin: 1rem;
        padding: 1rem;
        border-radius: 12px;
        font-size: 0.85rem;
        text-align: center;
    }

    /* Modal adjustments for mobile */
    .modal-content {
        width: 95%;
        max-width: 400px;
        margin: 10% auto;
        padding: 1.5rem;
        border-radius: 15px;
    }

    .modal-content input {
        font-size: 16px;
        /* Prevent zoom */
        padding: 0.75rem;
        border-radius: 10px;
    }

    .modal-content button {
        padding: 0.75rem 1.5rem;
        border-radius: 10px;
        font-size: 0.9rem;
    }
}

/* Medium screens (tablets) */
@media (min-width: 481px) and (max-width: 768px) {
    .app-container {
        flex-direction: row;
    }

    .header {
        padding: 1.5rem 2rem;
    }

    .header h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .search-container {
        max-width: 400px;
        margin: 0 auto;
    }

    #searchInput {
        font-size: 16px;
        padding: 1rem 1.5rem;
        border-radius: 25px;
    }

    #searchBtn {
        padding: 1rem 1.5rem;
        border-radius: 25px;
    }

    .sidebar {
        width: 300px;
        position: relative;
        transform: none;
        max-height: none;
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(20px);
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
    }

    .sidebar::before {
        display: none;
    }

    .content-area {
        flex: 1;
        padding: 2rem;
        margin-top: 0;
        margin-bottom: 0;
    }

    .songs-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .song-card {
        padding: 1.5rem;
        min-height: 120px;
        border-radius: 20px;
    }

    .song-card-thumbnail {
        width: 80px;
        height: 60px;
        border-radius: 10px;
    }

    .song-card-info h3 {
        font-size: 1.1rem;
    }

    .song-card-info p {
        font-size: 0.9rem;
    }

    .play-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
    }

    .player {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        padding: 1.5rem 2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0;
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(20px);
    }

    .player-controls button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .player-controls .play-pause-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .nav-menu {
        padding: 1.5rem;
    }

    .nav-menu a {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-radius: 15px;
        margin-bottom: 0.5rem;
    }

    .user-playlists {
        margin-top: 2rem;
        padding: 0 1.5rem;
    }

    #createPlaylistBtn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        border-radius: 15px;
    }
}

/* Large screens and up */
@media (min-width: 769px) {
    .songs-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 2rem;
    }

    .song-card {
        padding: 2rem;
        border-radius: 25px;
        min-height: 140px;
    }

    .song-card-thumbnail {
        width: 100px;
        height: 75px;
        border-radius: 12px;
    }

    .song-card-info h3 {
        font-size: 1.2rem;
    }

    .song-card-info p {
        font-size: 1rem;
    }

    .play-btn {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.4rem !important;
    }

    .player-controls button {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }

    .player-controls .play-pause-btn {
        width: 70px;
        height: 70px;
        font-size: 1.7rem;
    }
}

/* Touch-friendly enhancements */
@media (pointer: coarse) {

    button,
    .clickable {
        min-height: 44px;
        min-width: 44px;
    }

    .song-card {
        min-height: 85px;
        max-height: 85px;
        padding: 1.2rem;
    }

    .song-card-thumbnail {
        width: 70px;
        height: 52px;
    }

    .play-btn {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
    }

    .song-card-title {
        font-size: 1rem;
    }

    .song-card-artist {
        font-size: 0.85rem;
    }

    .song-card-stats {
        font-size: 0.7rem;
        gap: 1rem;
    }

    .nav-menu a {
        min-height: 48px;
    }
}

/* Landscape mode adjustments for phones */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        padding: 0.5rem 1rem;
    }

    .header h1 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .content-area {
        margin-top: 100px;
        margin-bottom: 120px;
    }

    .player {
        padding: 0.5rem 1rem;
    }

    .player-info {
        margin-bottom: 0.5rem;
    }

    .player-controls {
        margin-bottom: 0.5rem;
    }

    .sidebar {
        max-height: 60vh;
        transform: translateY(calc(100% - 40px));
    }
}

/* Hover efektleri sadece desktop için */
@media (hover: hover) and (pointer: fine) {
    .song-card:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    }

    .nav-menu a:hover {
        transform: translateX(5px);
        background: rgba(255, 255, 255, 0.1);
    }

    #createPlaylistBtn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    }

    .player-controls button:hover {
        transform: scale(1.1);
    }

    .play-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    }
}

/* Print Styles */
@media print {

    .player,
    .sidebar,
    .search-container {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .content-area {
        background: white !important;
        color: black !important;
    }
}

/* Extra small screens - Song card optimizations */
@media (max-width: 480px) {
    .song-card {
        padding: 1rem;
        gap: 1rem;
        margin-bottom: 1rem;
        min-height: 75px;
        max-height: 75px;
    }

    .song-card-thumbnail {
        width: 60px;
        height: 45px;
    }

    .song-card-title {
        font-size: 0.95rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }

    .song-card-artist {
        font-size: 0.8rem;
    }

    .song-card-stats {
        font-size: 0.65rem;
        gap: 0.8rem;
        padding: 0.2rem 0.4rem;
    }

    .song-card-stats .stat-item {
        gap: 0.2rem;
    }

    .play-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .songs-grid {
        gap: 1rem;
    }
}