html.preload *,
html.preload *::before,
html.preload *::after {
  transition: none !important;
  animation: none !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: "Figtree", sans-serif;
    background-color: #0e0e0e;
    color: #f1f1f1;
    transition: background-color 1s ease, color 1s ease;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 70px;
    height: 100vh;
    background: #0e0e0e;
    display: flex;
    align-items: center;
    z-index: 20;
    transition: background 0.45s;
}

body.light-theme .sidebar {
    background: #f1f1f1;
}

.sidebar-bar {
    position: absolute;
    left: 55px;
    top: 5vh;
    height: 90vh;
    width: 1px;
    background: #fff;
    border-radius: 1px;
    transition: background 0.45s;
}

body.light-theme .sidebar-bar {
    background: #111;
}

.sidebar-icons {
    position: absolute;
    left: 0;
    top: calc(5vh + 20px);
    width: 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.icon-link {
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    outline: none;
    width: 38px;
    height: 38px;
    transition: background 0.2s;
    border-radius: 50%;
}

.icon-link:active, .icon-link:focus {
    background: rgba(255,255,255,0.09);
}

.icon {
    width: 28px;
    height: 28px;
    transition: filter 0.17s, opacity 0.45s;
    filter: invert(1);
    opacity: 1;
}

body.light-theme .icon {
    filter: none;
}

.icon-link:hover .icon,
.icon-link:focus .icon {
    filter: brightness(2.2) invert(1);
    opacity: 0.85;
}

body.light-theme .icon-link:hover .icon,
body.light-theme .icon-link:focus .icon {
    filter: brightness(0.6);
    opacity: 0.85;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1002;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.hamburger-line {
    width: 28px;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
}

body.light-theme .hamburger-line {
    background-color: #0e0e0e;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0e0e0e 0%, #1a1a1a 100%);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

body.light-theme .mobile-menu-overlay {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.4s ease 0.1s;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    text-decoration: none;
    color: #f1f1f1;
    font-size: 1.2rem;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 400px;
    backdrop-filter: blur(10px);
}

body.light-theme .mobile-menu-item {
    background: rgba(0, 0, 0, 0.05);
    color: #0e0e0e;
}

.mobile-menu-item:hover {
    transform: translateX(10px);
    border-color: #1db954;
    background: rgba(29, 185, 84, 0.1);
}

body.light-theme .mobile-menu-item:hover {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.mobile-menu-item img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

body.light-theme .mobile-menu-item img {
    filter: brightness(0) invert(0);
}

.header {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 40px 0;
    margin-left: 70px;
}

.header-logo {
    width: 250px;
    height: auto;
    transition: all 0.5s ease;
}

body.light-theme .header-logo {
    content: url('../assets/playlistconverter-logo-b.png');
}

body.light-theme {
    background-color: #f1f1f1;
    color: #111;
}

.main-content {
    margin-left: 70px;
    padding: 0 40px 80px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: calc(100vh - 150px);
}

.dashboard-header {
    text-align: center;
    margin-bottom: clamp(30px, 5vw, 50px);
}

.dashboard-header h1 {
    font-size: clamp(1.3rem, 4vw, 1.8rem);
    font-weight: 700;
    color: #f1f1f1;
    margin-bottom: 16px;
    font-family: "Archivo Black", sans-serif;
}

body.light-theme .dashboard-header h1 {
    color: #111;
}

.playlist-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.playlist-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

body.light-theme .playlist-card {
    background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.05));
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.playlist-card:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
    border-color: rgba(29, 185, 84, 0.4);
}

body.light-theme .playlist-card:hover {
    background: rgba(0,0,0,0.06);
    border-color: rgba(29, 185, 84, 0.4);
}

.playlist-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f1f1;
}

body.light-theme .playlist-name {
    color: #111;
}

.card-arrow-icon {
    width: 20px;
    height: 20px;
    fill: #888;
    transition: all 0.3s ease;
}

.playlist-card:hover .card-arrow-icon {
    transform: translateX(5px);
    fill: #1db954;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    background: #181818;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}

body.light-theme .modal-content {
    background: #fff;
    border-color: #eee;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
}

body.light-theme .modal-header {
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

body.light-theme .modal-header h3 {
    color: #111;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: #fff;
}

body.light-theme .close-modal-btn:hover {
    color: #000;
}

.modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.stat-big-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: #1db954;
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: #ccc;
}

body.light-theme .stat-label {
    color: #555;
}

.modal-meta {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 10px;
}

.btn-danger {
    background: rgba(255, 77, 79, 0.1);
    color: #ff4d4f;
    border: 1px solid transparent;
    padding: 12px 30px;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-danger:hover {
    background: rgba(255, 77, 79, 0.2);
    border-color: rgba(255, 77, 79, 0.3);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .header {
        margin-left: 0;
        padding: 30px 0 20px 0;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .playlist-card {
        padding: 18px 20px;
    }
}

@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 1.2rem;
    }

    .header-logo {
        width: 200px;
    }

    .stat-number {
        font-size: 2.8rem;
    }
}