:root {
    --bg-dark: #0f121a;
    --card-bg: #1a1e29;
    --primary: #ffd700;
    --primary-hover: #e6c200;
    --text-main: #ffffff;
    --text-muted: #8b9bb4;
    --border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(0, 0, 0, 0.3);
    --success: #2ecc71;
    --error: #e74c3c;
}

html {
    -webkit-text-size-adjust: 100%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #0f121a0a;
    background-image: linear-gradient(rgb(0, 0, 0), rgba(15, 18, 26, 0.9)), url('assets/ximage.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    flex-direction: column;
    padding: 20px 0 32px;
}

img {
    max-width: 100%;
    display: block;
}

/* Dynamic Background */
.app-background {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation: move 20s infinite alternate;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #3498db;
    bottom: -50px;
    right: -50px;
    animation: move 15s infinite alternate-reverse;
}

@keyframes move {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(50px, 50px);
    }
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(16px, 3vw, 24px);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 18px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 10px;
}

.logo img {
    height: 50px;
    width: auto;
}

.logo-text {
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-left: 0;
}

.status-badge {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.dot {
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 10px #2ecc71;
}

/* Main Card */
.main-card {
    background: var(--card-bg);
    border-radius: 24px;
    display: flex;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgb(0, 0, 0);
    overflow: hidden;
    min-height: 600px;
    width: 100%;
}

.card-left {
    flex: 0.8;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), black);
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.card-left::after {
    content: '';
    position: absolute;
    right: 0;
    top: 10%;
    height: 80%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--border), transparent);
}

.hero-text h1 {
    font-size: 2.8rem;
    line-height: 1.1;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 90%;
}

.info-box {
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid #3498db;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 40px;
}

.info-box i {
    color: #3498db;
    font-size: 1.2rem;
}

.info-box p {
    font-size: 0.9rem;
    color: #cadbee;
    margin: 0;
}

.features-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.feature-item i {
    color: var(--primary);
}

.card-right {
    flex: 1.2;
    padding: 50px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

/* Form Styles */
.form-header {
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.step-text {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    transition: 0.3s;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    background: var(--input-bg);
    border: 1px solid var(--border);
    padding: 14px 15px 14px 45px;
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    appearance: none;
    -webkit-appearance: none;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

.input-wrapper input:focus+.focus-border+i,
.input-wrapper input:focus~i,
.input-wrapper select:focus+.focus-border+i,
.input-wrapper select:focus~i {
    color: var(--primary);
}

.right-icon {
    right: 15px;
    left: auto !important;
    pointer-events: none;
}

.toggle-pass {
    right: 15px;
    left: auto !important;
    cursor: pointer;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 25px 0;
}

.row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.form-group.half {
    flex: 1;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.2);
}

.form-footer {
    text-align: center;
    font-size: 0.8rem;
    color: #bbb;
    margin-top: 20px;
}

.form-footer a {
    color: #fff;
    text-decoration: none;
}

/* Success View */
.success-view {
    text-align: center;
    padding: 40px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: rgba(46, 204, 113, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: #2ecc71;
    font-size: 2.5rem;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-view h2 {
    margin-bottom: 10px;
    color: #fff;
}

.success-view p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.instruction {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px !important;
    border: 1px dashed var(--border);
}

.reset-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.reset-btn:hover {
    border-color: var(--primary);
    color: #fff;
}


/* Animations */
.animate-fade-down {
    animation: fadeDown 0.8s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.8s ease-out;
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0);
    }

    80% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .main-card {
        flex-direction: column-reverse;
        min-height: auto;
    }

    .card-left::after {
        display: none;
    }

    .card-left {
        padding: 30px;
        text-align: center;
    }

    .features-list {
        justify-content: center;
    }

    .card-right {
        padding: 30px;
    }
}

/* Mobile vs Desktop Header Visibility */
.mobile-only-header {
    display: none;
    /* Hidden on desktop */
    font-size: 2.5rem;
    line-height: 1.1;
    text-align: center;
    padding: 0 0 20px 0;
    margin-bottom: 0;
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    width: 100%;
}

@media (max-width: 900px) {
    .mobile-only-header {
        display: block;
        /* Show on mobile */
    }

    .desktop-only-header {
        display: none;
        /* Hide on mobile */
    }
}

/* Navigation */
.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    color: #000;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn-nav:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.nav-links a:hover,
.nav-links a.active {
    color: #000;
}

.btn-primary-sm {
    background: var(--primary);
    color: #000 !important;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600 !important;
}

.btn-primary-sm:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

/* Tabs */
.tab-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 5px;
    display: flex;
    margin-bottom: 30px;
}

.tab-switch {
    flex: 1;
    text-align: center;
    padding: 12px;
    cursor: pointer;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 600;
    transition: 0.3s;
    font-size: 0.95rem;
}

.tab-switch.active {
    background: #232936;
    color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.tab-switch:hover:not(.active) {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.tab-content {
    animation: fadeDown 0.5s ease-out;
    display: none;
    /* hidden by default */
}

.tab-content.active {
    display: block;
}

/* Compact Footer (Same as Header) */
.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    max-width: 100%;
    margin: 40px 0 20px;
    padding: 20px;
    background: transparent;
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-left p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.footer-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.2s;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-socials {
    display: flex;
    gap: 15px;
    margin-left: 20px;
    border-left: 1px solid var(--border);
    padding-left: 20px;
}

.footer-socials a {
    color: #fff;
    font-size: 1.1rem;
    transition: 0.2s;
}

.footer-socials a:hover {
    color: #fff;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {

    .header,
    .footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-socials {
        border-left: none;
        padding-left: 0;
        margin-left: 0;
    }
}

/* Playlist List Styles */
.playlist-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.playlist-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.pl-info h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #fff;
}

.pl-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.pl-action {
    display: flex;
    align-items: center;
    gap: 15px;
}

.page-content {
    width: min(100%, 800px);
}

body.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 24px 16px;
}

.auth-header,
.auth-footer {
    width: min(100%, 1000px);
}

.auth-header {
    margin: 0 auto;
}

.auth-footer {
    margin-top: auto;
}

.auth-page .login-card {
    margin: auto 0;
}

.pl-action i {
    color: #f39c12;
    font-size: 1.1rem;
}

.btn-manage {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
}

.btn-manage:hover {
    background: var(--primary-hover);
    transform: translateX(3px);
}

.back-link {
    background: none;
    border: none;
    color: #000;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 10px;
    padding: 0;
}

.back-link:hover {
    color: #000;
}

.empty-state {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* Active Badge */
.badge-active {
    background: #2ecc71;
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    text-transform: uppercase;
    vertical-align: middle;
}

/* Select Button */
.btn-select {
    background: transparent;
    border: 1px solid #3498db;
    color: #3498db;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 10px;
    transition: all 0.2s;
}

.btn-select:hover {
    background: #3498db;
    color: #fff;
}

@media (max-width: 900px) {
    body {
        background-attachment: scroll;
    }

    .hero-text p {
        max-width: 100%;
    }

    .free-badge-container {
        width: 100%;
        padding: 12px 16px !important;
    }
}

@media (max-width: 768px) {
    body {
        align-items: stretch;
        padding: 0 0 24px;
    }

    .container {
        padding: 14px;
    }

    .header,
    .footer {
        align-items: stretch;
    }

    .logo {
        justify-content: center;
        width: 100%;
    }

    .logo img {
        height: 42px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .nav-links a {
        width: calc(50% - 4px);
        min-height: 44px;
        text-align: center;
    }

    .btn-primary-sm {
        width: 100%;
    }

    .main-card {
        border-radius: 18px;
    }

    .card-left,
    .card-right {
        padding: 24px 18px;
    }

    .hero-text h1,
    .mobile-only-header {
        font-size: clamp(1.85rem, 8vw, 2.35rem);
    }

    .hero-text p {
        font-size: 1rem;
        margin-bottom: 28px;
    }

    .info-box {
        align-items: flex-start;
        margin-bottom: 28px;
    }

    .features-list {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .feature-item {
        width: 100%;
    }

    .row {
        flex-direction: column;
        gap: 0;
    }

    .tab-container {
        flex-direction: column;
        gap: 6px;
    }

    .playlist-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .pl-action {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .page-content {
        width: 100%;
        margin: 24px auto !important;
        padding: 24px 18px !important;
        border-radius: 16px !important;
    }

    .page-content h1 {
        font-size: 1.9rem !important;
        margin-bottom: 20px !important;
    }

    .page-content h2 {
        font-size: 1.2rem !important;
        margin: 24px 0 12px !important;
    }

    .step {
        padding: 16px !important;
    }

    body.auth-page {
        align-items: stretch;
        justify-content: flex-start;
        gap: 18px;
        padding: 16px;
    }

    .auth-header,
    .auth-footer {
        width: 100%;
    }

    .auth-page .login-card {
        margin: 0;
        padding: 24px !important;
        border-radius: 18px !important;
    }

    .auth-footer {
        margin-top: 0;
    }
}

@media (max-width: 480px) {
    .nav-links a {
        width: 100%;
    }

    .input-wrapper input,
    .input-wrapper select {
        font-size: 16px;
        padding: 13px 14px 13px 42px;
    }

    .submit-btn {
        padding: 14px;
    }

    .playlist-item {
        padding: 16px;
    }

    .pl-action {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .btn-manage,
    .btn-select {
        width: 100%;
        justify-content: center;
        margin-right: 0;
    }

    .info-box {
        padding: 14px;
    }
}
