/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styles with dark theme */
body {
    background-image: url('/images/background.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    color: #E0E0E2;
    font-family: Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    padding-bottom: 90px; /* Player height */
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(114, 24, 23, 0.85);
    z-index: -1;
}

/* Main content area */
main#app-content {
    flex-grow: 1;
	padding: 80px 150px 20px 150px; 
    width: 100%;
    box-sizing: border-box;
}

/* ===== HEADER STYLES ===== */
:root {
    --primary-color: #2B4162;
    --secondary-color: #bdcbde;
    --accent-color: #ffd679;
    --accent-color-rgb: 255, 214, 121;
    --light-bg: #E0E0E2;
    --dark-text: #333;
    --input-bg: rgba(0, 0, 0, 0.3);
    --container-bg: #1A1A1A;
    --text-light: #E0E0E2;
    --text-secondary: #A0A0A0;
}

.header {
    background: rgba(30, 45, 68, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(250, 159, 66, 0.2);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    height: 70px;
}

.logo img {
    height: 70px;
    width: auto;
    margin-right: 10px;
}

.search-bar-header {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 20px;
    position: relative;
}

.search-bar-header input {
    width: 380px;
    height: 42px;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(250, 159, 66, 0.3);
    background: rgba(15, 23, 42, 0.7);
    color: #E0E0E2;
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-bar-header input::placeholder {
    color: var(--secondary-color);
}

.search-bar-header input:focus {
    outline: none;
    border-color: rgba(250, 159, 66, 0.8);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 15px rgba(250, 159, 66, 0.3);
}

.search-bar-header button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: #FA9F42;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-bar-header button:hover {
    background: #E0E0E2;
}

.search-bar-header .icon {
    width: 20px;
    height: 20px;
    stroke: #1E2D44;
}

.profile-avatar-container {
    margin-left: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.profile-avatar {
    width: 40px; /* Avatar boyutu */
    height: 40px;
    border-radius: 50%; /* Yuvarlak avatar */
    object-fit: cover; /* Resmi kesmeden sığdır */
    border: 2px solid var(--accent-color-main); /* Çerçeve */
    cursor: pointer;
    transition: transform 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

/* Hamburger menu styles */
.hamburger-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--light-bg);
    transition: 0.3s;
}

.hamburger-menu.active span:nth-child(1),
.hamburger-menu[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active span:nth-child(2),
.hamburger-menu[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3),
.hamburger-menu[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Dropdown menu styles */
.dropdown-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: #2c2c2c;
    transition: right 0.3s ease;
    z-index: 999;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
}

.dropdown-nav.active {
    right: 0;
}

.nav-content {
    padding: 80px 20px 20px;
    height: 100%;
    overflow-y: auto;
}

.login-info {
    color: var(--light-bg);
    margin-bottom: 20px;
}

.login-info span {
    display: block;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 500;
}

.auth-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-link {
    color: var(--secondary-color);
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 16px;
    border: 1px solid transparent;
}

.auth-link:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    transform: translateX(5px);
}

/* ===== CARD & GRID STYLES ===== */

.card-grid {
    display: grid;
    /* Her sütunun en az 220px olmasını ve sığdıkça yeni sütun eklenmesini sağlar */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.8rem;
    padding: 20px;
    margin-top: 70px; /* Header yüksekliği kadar boşluk */
}

.card {
    position: relative;
    background: rgba(30, 45, 68, 0.45);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: transform 0.3s ease, border-color 0.4s ease;
    z-index: 1;
}

/* Kartın altındaki parlama efekti */
.card::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 60%;
    background: radial-gradient(circle, rgba(250, 159, 66, 0.35) 0%, transparent 70%);
    filter: blur(35px);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(250, 159, 66, 0.5);
}

.card:hover::before {
    opacity: 1;
}

.card-artwork {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 kare oranı */
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.card-artwork img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-artwork img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card:hover .card-overlay {
    opacity: 1;
}

/* Ortadaki büyük Play butonu */
.js-play-media-btn {
    background: #FA9F42;
    color: #121212;
    border-radius: 50%;
    width: 50px; height: 50px;
    font-size: 1.4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    box-shadow: 0 0 20px rgba(250, 159, 66, 0.5);
}
.js-play-media-btn:hover {
    box-shadow: 0 0 30px rgba(250, 159, 66, 0.8);
	background: #fff;
}

/* Soldaki dikey ikon butonları */
.card-actions-vertical {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease 0.1s, transform 0.3s ease 0.1s;
}
.card:hover .card-actions-vertical {
    opacity: 1;
    transform: translateX(0);
}

.icon-btn {
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-light);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.icon-btn:hover {
    background: #FA9F42;
    color: #121212;
}
.action-btn-icon.liked,
.icon-btn.liked,
.card .icon-btn.like-btn.liked:hover {
    background: #E11D48;
    color: #fff;
    border-color: #E11D48;
}

/* Hem karttaki hem oynatıcıdaki TAKİP EDİLEN butonun stili */
.icon-btn.follow-btn.followed,
.action-btn-icon.js-follow-artist-video-btn.followed,
.icon-btn.follow-btn.followed:hover,
.action-btn-icon.js-follow-artist-video-btn.followed:hover {
    background-color: #1D9BF0; /* Twitter Mavisi */
    color: #ffffff;
    border-color: transparent;
}

.card-info {
    padding: 1rem;
}
.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-artist {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Loader için stil */
.loader-container {
    padding: 2rem;
    text-align: center;
    /* Grid'in tüm sütunlarını kaplaması için */
    grid-column: 1 / -1;
}

/* ===== FOOTER MUSIC PLAYER ===== */
.music-player {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 90px;
    background: #1A1A1A;
    border-top: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    z-index: 1001;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.player-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1600px;
    gap: 15px;
}

.player-artwork {
    width: 140px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: #000;
}

.player-artwork img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#mini-video-preview {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    cursor: pointer;
    z-index: 2;
    display: none;
}

#mini-video-preview.active + #currentArtwork {
    display: none;
}

.player-loader-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.track-info {
    flex: 1;
    min-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-info h4 {
    margin: 0; font-size: 0.95rem; font-weight: 500;
}

.track-info p {
    margin: 0; font-size: 0.75rem; color: var(--text-secondary);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.control-btn {
    background: none;
    border: none;
    color: #A0A0A0;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s, transform 0.2s;
    padding: 5px;
}

.control-btn:hover {
    color: #FFFFFF;
    transform: scale(1.1);
}

.play-pause-btn {
    font-size: 1.5rem;
    margin: 0 5px;
}

.progress-area {
    flex: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
}

.time-display {
    font-size: 0.75rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: #444;
    border-radius: 2px;
    cursor: pointer;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FF5722;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FF5722;
    cursor: pointer;
    border: none;
}

.volume-area {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 120px;
    flex-shrink: 0;
}

#volumeBar::-webkit-slider-thumb {
    background: #fff;
    width: 10px;
    height: 10px;
}

#volumeBar::-moz-range-thumb {
    background: #fff;
    width: 10px;
    height: 10px;
}

/* ===== UTILITIES & OTHER ===== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    border: 8px solid rgba(255, 255, 255, 0.2);
    border-top: 8px solid #FA9F42;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification {
    padding: 15px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification.success {
    background-color: #28a745;
    border-left: 5px solid #208a38;
}

.notification.error {
    background-color: #dc3545;
    border-left: 5px solid #b32a37;
}

/* Playlist Modal */
.modal {
    position: fixed; z-index: 3002; left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex; justify-content: center; align-items: center;
}

.modal-content {
    background: var(--container-bg);
    padding: 2rem; border-radius: 12px;
    width: 90%; max-width: 400px;
    position: relative;
    border: 1px solid rgba(var(--accent-color-rgb), 0.2);
}

.close-btn {
    color: #aaa; position: absolute; top: 10px; right: 20px;
    font-size: 28px; font-weight: bold; cursor: pointer;
}
.close-btn:hover { color: white; }

.new-playlist-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.new-playlist-form input {
    flex-grow: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.new-playlist-form input:focus {
    outline: none;
    border-color: #FA9F42;
}

.new-playlist-form button {
    background: #FA9F42;
    color: #121212;
    border: none;
    padding: 0 1.5rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}
.new-playlist-form button:hover {
    background: #ffd679;
}
.new-playlist-form button:disabled {
    background: #555;
    cursor: not-allowed;
}

/* Liste Konteyneri ve Elemanları */
.playlist-list-container {
    max-height: 250px; /* Çok fazla liste varsa scroll olur */
    overflow-y: auto;
    padding-right: 5px; /* Scrollbar için boşluk */
}
.playlist-list-container p {
    color: #999;
    text-align: center;
    padding: 1rem 0;
}

.playlist-list-container .playlist-option {
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #eee;
}

.playlist-list-container .playlist-option:hover {
    background: #FA9F42;
    color: #121212;
}

#playlist-list-container .playlist-option {
    padding: 0.8rem 1rem;
    background: var(--input-bg);
    border-radius: 6px; margin-bottom: 0.5rem;
    cursor: pointer; transition: background 0.2s;
}

#playlist-list-container .playlist-option:hover {
    background: rgba(var(--accent-color-rgb), 0.2);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .video-player-grid {
        grid-template-columns: 1fr;
    }
    .video-player-comments {
        margin-top: 1.5rem;
    }
}

@media (max-width: 768px) {
    .search-bar-header {
       display: none;
    }

    .player-container {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 8px;
    }
    .music-player {
        height: auto;
        padding: 10px;
    }
    .track-info {
        flex-basis: 100%;
        text-align: center;
    }
    .progress-area {
        order: -1; /* Move progress bar to the top */
        flex-basis: 100%;
    }
}

@media (max-width: 576px) {
    .video-info-bar {
        padding: 1rem;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .video-player-grid {
        padding: 1rem;
    }

    .video-playback-info-panel {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .video-playback-actions {
        align-self: center;
    }
}