/* =========================================
   БАЗА
   ========================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Меню в адмінці (/admin/) */
.admin-menu {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.admin-menu li {
    margin: 0;
}

.admin-menu a {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #1f2937;
    background: #020617;
    color: #e5e7eb;
    font-size: 15px;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, transform .12s ease;
}

.admin-menu a span {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.admin-menu a:hover {
    background: #0b1120;
    border-color: #38bdf8;
    transform: translateY(-1px);
}


body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #020617;
    color: #e2e8f0;
}

a {
    color: #60a5fa;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* Основний контейнер сторінки (для нового header.php) */
.page-main {
    padding: 32px 16px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Залишаємо для сумісності зі старою розміткою */
.page-content {
    padding: 32px 16px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* =========================================
   HEADER / NAV
   ========================================= */

.site-header {
    background: #020617;
    border-bottom: 1px solid #1e293b;
}

.site-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    color: #f9fafb;
    font-size: 22px;
    font-weight: 700;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: #cbd5e1;
    font-size: 15px;
}
.main-nav a:hover {
    color: #fff;
}

/* =========================================
   КНОПКИ
   ========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #38bdf8;
    color: #e0f2fe;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
}

.btn:hover {
    background: rgba(56, 189, 248, 0.15);
}

/* =========================================
   ГОЛОВНА: СПИСОК ПЛЕЙЛИСТІВ
   ========================================= */

.playlists h2 {
    font-size: 28px;
    margin: 0 0 24px;
}

.playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
    padding: 8px 0;
}

.playlist-card-link {
    text-decoration: none;
    color: inherit;
}

.playlist-card-main {
    background: #0f172a;
    border-radius: 14px;
    border: 1px solid #1e293b;
    padding: 16px;
    display: flex;
    flex-direction: column;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    height: 100%;
}

.playlist-card-main:hover {
    transform: translateY(-3px);
    background: #111827;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.6);
}

.playlist-cover img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.playlist-info h3 {
    margin: 12px 0 4px;
    font-size: 18px;
    font-weight: 600;
    color: #f9fafb;
}

.playlist-small-desc {
    margin: 0;
    font-size: 14px;
    color: #94a3b8;
}

/* =========================================
   БЛОК "СЕЙЧАС ИГРАЕТ" НА СТРАНИЦЕ ПЛЕЙЛИСТА
   ========================================= */

.player-block {
    margin-bottom: 28px;
}

.player-block h2 {
    font-size: 22px;
    margin: 6px 0 10px;
}

/* =========================================
   СТОРІНКА ПЛЕЙЛИСТА: ШАПКА
   ========================================= */

.playlist-card {
    background: #020617;
    border-radius: 18px;
    border: 1px solid #1e293b;
    padding: 24px;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 22px;
}

.playlist-header-main {
    display: flex;
    gap: 18px;
}

.playlist-cover--large {
    width: 120px;
    height: 120px;
}

.playlist-cover--large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.playlist-desc {
    margin-top: 6px;
    font-size: 14px;
    color: #9ca3af;
}

.playlist-spotify-link a {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #38bdf8;
    background: #0b1120;
    color: #e0f2fe;
    font-size: 14px;
    white-space: nowrap;
}
.playlist-spotify-link a:hover {
    background: #082f49;
}

/* =========================================
   СТОРІНКА ПЛЕЙЛИСТА: СІТКА ТРЕКІВ
   ========================================= */

.track-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.track-card {
    background: #020617;
    border: 1px solid #1f2937;
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
    height: 100%;
}

.track-card:hover {
    background: #0b1120;
    border-color: #38bdf8;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.7);
}

/* вибраний трек */
.track-card--playing {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
}

.track-cover {
    position: relative;
    flex-shrink: 0;
}

.track-cover img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.track-position {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: #0f172a;
    color: #f9fafb;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    border: 1px solid #1f2937;
}

.track-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.track-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #e5e7eb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 13px;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-meta {
    font-size: 11px;
    color: #9ca3af;
}

/* =========================================
   ВЕЛИКА КНОПКА "ДОДАТИ СВІЙ ТРЕК"
   ========================================= */

.add-track-block {
    display: flex;
    justify-content: center;
    margin: 20px 0 8px;
}

.add-track-big-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;

    padding: 16px 26px;
    max-width: 480px;
    width: 100%;
    border-radius: 999px;
    background: radial-gradient(circle at 0 0, rgba(34, 197, 94, 0.4), transparent 55%),
                linear-gradient(90deg, #22c55e, #16a34a);
    color: #052e16;
    box-shadow: 0 18px 40px rgba(34, 197, 94, 0.45);
    text-decoration: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

.add-track-big-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 50px rgba(34, 197, 94, 0.55);
    opacity: 0.95;
}

.add-track-big-btn__icon {
    font-size: 26px;
    font-weight: 700;
}

.add-track-big-btn__main {
    font-weight: 700;
    font-size: 17px;
}

.add-track-big-btn__sub {
    font-size: 13px;
    opacity: 0.9;
}

/* =========================================
   СТАТИСТИКА ПЛЕЙЛИСТА
   ========================================= */

.playlist-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 0;
}

.playlist-stat-item {
    background: #020617;
    border-radius: 12px;
    border: 1px solid #1f2937;
    padding: 10px 14px;
    min-width: 165px;
}

.playlist-stat-label {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.playlist-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #f9fafb;
}

/* =========================================
   FOOTER (новий, під site-footer)
   ========================================= */

.site-footer {
    margin-top: 60px;
    background: #0e111a;
    padding: 40px 20px 20px;
    color: #ccc;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
}

.footer-col {
    flex: 1 1 250px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 16px;
}

.footer-col p {
    margin: 0;
    opacity: 0.7;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin: 6px 0;
}

.footer-col ul li a {
    color: #bbb;
    text-decoration: none;
    transition: 0.2s;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 14px;
    color: #888;
}

/* =========================================
   НОВИНИ (публічна частина)
   ========================================= */

.news-list h1,
.news-article h1 {
    font-size: 28px;
    margin-bottom: 18px;
}

.news-card {
    background: #020617;
    border-radius: 14px;
    border: 1px solid #1f2937;
    padding: 16px 18px;
    margin-bottom: 18px;
}

.news-card h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.news-meta {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.news-excerpt,
.news-lead {
    font-size: 14px;
    color: #cbd5e1;
}

.news-read-more {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
}

.news-content {
    margin-top: 16px;
    font-size: 15px;
    line-height: 1.6;
}

.news-back-link {
    font-size: 13px;
}

/* Пагінація */

.pagination {
    margin-top: 20px;
    display: flex;
    gap: 6px;
}

.pagination-link,
.pagination-current {
    padding: 4px 9px;
    border-radius: 8px;
    border: 1px solid #1f2937;
    font-size: 14px;
}

.pagination-link {
    color: #e5e7eb;
}
.pagination-link:hover {
    background: #1f2937;
}
.pagination-current {
    background: #1f2937;
}

/* =========================================
   НОВИНИ НА ГОЛОВНІЙ: 2-КОЛОНОЧНА СІТКА
   ========================================= */

.home-news-grid-section {
    margin-top: 60px;
}

.home-news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.home-news-header h2 {
    font-size: 28px;
    color: #fff;
}

.home-news-all-link {
    color: #4db5ff;
    text-decoration: none;
    font-size: 16px;
}
.home-news-all-link:hover {
    color: #bfdbfe;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

/* Картка новини */

.news-card-grid {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    transition: transform .2s ease, box-shadow .2s ease;
}

.news-card-grid:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.35);
}

/* Картинка на всю ширину */

.news-card-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* Текст */

.news-card-body {
    padding: 18px 20px 22px;
}

.news-card-title a {
    font-size: 19px;
    color: #fff;
    text-decoration: none;
    line-height: 1.3;
}

.news-card-title a:hover {
    color: #4db5ff;
}

/* Перекриваємо базовий .news-meta на більший шрифт у картках-грід */
.news-card-body .news-meta {
    font-size: 14px;
    opacity: 0.7;
    margin: 6px 0 10px;
}

.news-excerpt {
    color: #cfcfcf;
    font-size: 15px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.news-read-more {
    color: #4db5ff;
    text-decoration: none;
    font-size: 15px;
}

/* =========================================
   АДМІНКА
   ========================================= */

.admin-body {
    background: #020617;
    color: #e5e7eb;
}

.admin-container {
    max-width: 900px;
    margin: 30px auto;
    padding: 0 16px 40px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    border: 1px solid #1f2937;
    padding: 6px 8px;
    text-align: left;
}

.admin-table th {
    background: #020617;
}

.admin-form input[type="text"],
.admin-form textarea {
    width: 100%;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid #1f2937;
    background: #020617;
    color: #e5e7eb;
    margin: 4px 0 10px;
    font-size: 14px;
}

.admin-form textarea {
    resize: vertical;
}

.admin-fieldset {
    border: 1px solid #1f2937;
    border-radius: 8px;
    padding: 8px 10px 4px;
    margin: 10px 0 12px;
}

.admin-fieldset legend {
    font-size: 13px;
    color: #9ca3af;
}

.admin-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 14px;
    font-size: 14px;
}

.admin-error {
    background: #7f1d1d;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

/* =========================================
   АДАПТИВ
   ========================================= */

@media (max-width: 900px) {
    .site-header-inner {
        padding-inline: 16px;
    }

    .page-main,
    .page-content {
        padding-inline: 16px;
    }

    .playlist-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .playlist-header-main {
        flex-direction: row;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card-img img {
        height: 250px;
    }
}

@media (max-width: 640px) {
    .site-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav {
        gap: 12px;
    }

    .playlist-cover--large {
        width: 90px;
        height: 90px;
    }

    .track-list {
        grid-template-columns: 1fr;
    }

    .playlist-grid {
        grid-template-columns: 1fr;
    }
}
