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: calc(100% - 70px);
    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 {
    width: calc(100% - 70px);
    margin-left: 70px;
    padding: clamp(20px, 5vw, 40px) clamp(10px, 3vw, 30px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.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;
}

.service-grid {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(15px, 3vw, 25px);
    justify-content: center;
    max-width: 1100px;
    width: 100%;
}

.service-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 20px;
    padding: clamp(20px, 4vw, 28px);
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: background 0.3s, border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    flex: 0 0 calc(33.333% - 17px);
    min-width: 250px;
}

body.light-theme .service-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);
}

.service-card:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.03));
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}

body.light-theme .service-card:hover {
    background: linear-gradient(180deg, rgba(0,0,0,0.03), rgba(0,0,0,0.07));
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.service-card p {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    color: #aaa;
    margin-top: 12px;
    line-height: 1.5;
}

body.light-theme .service-card p {
    color: #666;
}

body.light-theme .service-card:hover p {
    color: #444;
}

.linked-btn {
    background: linear-gradient(180deg, #34e07a, #1db954);
    color: #08120a;
    border: none;
    border-radius: 10px;
    padding: clamp(10px, 2vw, 14px) clamp(20px, 4vw, 28px);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
    box-shadow: 0 2px 10px rgba(29,185,84,0.3);
    display: inline-block;
}

.linked-btn.disabled {
    background: rgba(255,255,255,0.08);
    color: #555;
    cursor: not-allowed;
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.1);
}

.linked-btn.disabled:hover {
    background: rgba(255,255,255,0.11);
    color: #777;
    transform: none;
}

.linked-btn:not(.disabled):hover {
    background: linear-gradient(180deg, #42e684, #1ed760);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(29,185,84,0.4);
}

body.light-theme .linked-btn {
    background: linear-gradient(180deg, #34e07a, #1db954);
    color: #08120a;
}

body.light-theme .linked-btn:not(.disabled):hover {
    background: linear-gradient(180deg, #42e684, #1ed760);
}

body.light-theme .linked-btn.disabled {
    background: rgba(0,0,0,0.07);
    color: #aaa;
    border: 1px solid rgba(0,0,0,0.1);
}

body.light-theme .linked-btn.disabled:hover {
    background: rgba(0,0,0,0.1);
    color: #999;
}

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

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

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

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    .service-grid {
        flex-direction: column;
        align-items: center;
    }

    .service-card {
        flex: 1 1 100%;
        max-width: 400px;
        width: 100%;
    }
}

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

    .service-card {
        min-height: 160px;
    }

    .linked-btn {
        font-size: 1rem;
    }

    .header-logo {
        width: 200px;
    }
}
/* Premium badge on Playlist IA card */
.premium-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}
