* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #1a1a1a;
    color: #ffffff;
    font-family: 'Segoe UI', sans-serif;
}

/* NAVBAR */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    background-color: #111111;
    border-bottom: 1px solid #2a2a2a;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
}

.accent {
    color: #e8315a;
}

.search-bar {
    width: 400px;
    padding: 10px 16px;
    border-radius: 24px;
    border: 1px solid #333;
    background-color: #2a2a2a;
    color: #ffffff;
    font-size: 14px;
    outline: none;
}

.search-bar::placeholder {
    color: #888;
}

.search-bar:focus {
    border-color: #e8315a;
}

.navbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-login {
    background: transparent;
    border: 1px solid #555;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.2s;
}

.btn-login:hover {
    border-color: #e8315a;
    color: #e8315a;
}

.btn-signup {
    background: linear-gradient(135deg, #e8315a, #c0203f);
    border: none;
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-signup:hover {
    opacity: 0.85;
}

/* LAYOUT */
.layout {
    display: flex;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    min-height: calc(100vh - 57px);
    background-color: #111111;
    padding: 24px 12px;
    border-right: 1px solid #2a2a2a;
    position: sticky;
    top: 57px;
    height: calc(100vh - 57px);
    overflow-y: auto;
}

.sidebar-label {
    font-size: 11px;
    color: #666;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 12px 12px 6px;
}

.sidebar-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 2px;
}

.sidebar-item:hover {
    background-color: #2a2a2a;
    color: #ffffff;
}

.sidebar-item.active {
    background-color: #2a2a2a;
    color: #e8315a;
    font-weight: 600;
}

/* MAIN */
.main-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.btn-create {
    display: block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #e8315a, #c0203f);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 40px;
    transition: opacity 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-create:hover {
    opacity: 0.85;
}

/* SECTIONS */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
}

.section-header a {
    color: #888;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.section-header a:hover {
    color: #e8315a;
}

/* CARDS */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 40px;
}

.card {
    background-color: #222222;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(232, 49, 90, 0.2);
}

.card-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #333;
}

.card-title {
    padding: 8px 10px 4px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: block;
    padding: 0 10px 10px;
    font-size: 11px;
    color: #888;
}

/* MODAL OVERLAY */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

/* MODAL INFO */
.modal {
    background: #1a1a1a;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    position: relative;
    gap: 0;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #2a2a2a;
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #e8315a;
}

.modal-left {
    width: 380px;
    flex-shrink: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.modal-cover {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 10px;
    background: #2a2a2a;
}

.modal-title {
    font-size: 20px;
    font-weight: 800;
}

.modal-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #888;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.btn-like,
.btn-dislike {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #2a2a2a;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.btn-like:hover {
    border-color: #4caf50;
}

.btn-dislike:hover {
    border-color: #e8315a;
}

.btn-play-now {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e8315a, #c0203f);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-play-now:hover {
    opacity: 0.85;
}

.btn-share {
    width: 100%;
    padding: 14px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.btn-share:hover {
    border-color: #e8315a;
}

/* MODAL RIGHT - COMMENTS */
.modal-right {
    flex: 1;
    border-left: 1px solid #2a2a2a;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.modal-comments h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
}

.no-comments {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 60px 0;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.no-comments span {
    font-size: 36px;
}

/* PLAYER */
.modal-player {
    background: #000;
    width: 90%;
    max-width: 900px;
    height: 90vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.player-body {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.player-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.player-hud {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.player-timer {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.player-bpm {
    font-size: 18px;
    font-weight: 600;
    color: #e8315a;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.player-info {
    font-size: 14px;
    color: #aaa;
}

/* QUIT CONFIRM */
.quit-confirm {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.quit-box {
    background: #1a1a1a;
    border-radius: 14px;
    padding: 32px;
    text-align: center;
    width: 320px;
    border: 1px solid #333;
}

.quit-box h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.quit-box p {
    color: #888;
    font-size: 14px;
    margin-bottom: 24px;
}

.quit-buttons {
    display: flex;
    gap: 12px;
}

.btn-quit-cancel {
    flex: 1;
    padding: 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.btn-quit-cancel:hover {
    border-color: #e8315a;
}

.btn-quit-confirm {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #e8315a, #c0203f);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-quit-confirm:hover {
    opacity: 0.85;
}

.btn-login, .btn-signup {
    text-decoration: none;
    display: inline-block;
}

/* USER AVATAR */
.user-avatar {
    position: relative;
    cursor: pointer;
}

.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8315a, #c0203f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    user-select: none;
}

.avatar-dropdown {
    display: none;
    position: absolute;
    top: 48px;
    right: 0;
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 8px;
    min-width: 160px;
    z-index: 200;
    flex-direction: column;
    gap: 4px;
}

.avatar-dropdown.open {
    display: flex;
}

.avatar-username {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    padding: 6px 10px;
    border-bottom: 1px solid #333;
    margin-bottom: 4px;
}

.avatar-dropdown a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
    cursor: pointer;
}

.avatar-dropdown a:hover {
    background: #2a2a2a;
    color: #fff;
}

#btn-logout {
    color: #e8315a !important;
}

.btn-login[hidden], .btn-signup[hidden] {
    display: none !important;
}

.btn-create[hidden] {
    display: none !important;
}

/* AD SLOTS */
.ad-slot {
    width: 100%;
    height: 90px;
    background-color: #1a1a1a;
    border: 1px dashed #333;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.ad-label {
    font-size: 11px;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 1px;
}