:root {
    --bg: #000000;
    --surface: #0a0a0a;
    --text: #ffffff;
    --text-secondary: #aaaaaa;
    --text-muted: #666666;
    --danger: #ff4444;
    --success: #00ff88;
    --glass-bg: rgba(15, 15, 15, 0.55);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: rgba(0, 0, 0, 0.6);
    --tiktok-pink: #ff0050;
    --tiktok-blue: #00f2ea;
}

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

body {
    background: var(--bg);
    font-family: 'Press Start 2P', monospace;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    line-height: 1.8;
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(255, 0, 80, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(0, 242, 234, 0.05) 0%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 24px 24px, 24px 24px;
    position: relative;
}

/* ============ LOADING SCREEN ============ */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.6s cubic-bezier(0.76, 0, 0.24, 1);
    opacity: 1;
    visibility: visible;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.loading-bar-container {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff0050, #00f2ea);
    border-radius: 10px;
    width: 0%;
    animation: loading 2s ease-in-out forwards;
}

@keyframes loading {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.loading-text {
    font-size: 0.5rem;
    letter-spacing: 2px;
    color: var(--text-muted);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ============ NOTIFICATION ============ */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transform: translateX(120%);
    transition: all 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
    max-width: 380px;
    width: calc(100% - 40px);
    opacity: 0;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    animation: bounce 0.6s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 0.45rem;
    letter-spacing: 1px;
    color: var(--text);
    margin-bottom: 4px;
}

.notification-message {
    font-size: 0.35rem;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    line-height: 1.6;
    word-break: break-word;
}

.notification-link {
    color: #00f2ea;
    text-decoration: none;
    font-size: 0.35rem;
}

.notification-link:hover {
    text-decoration: underline;
}

.notification-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    padding: 0;
}

.notification-close:hover {
    background: rgba(255, 68, 68, 0.2);
    border-color: rgba(255, 68, 68, 0.4);
    color: #ff4444;
}

/* Container */
.container {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Card Utama */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 32px 24px;
    width: 100%;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 0%, rgba(255, 0, 80, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.card::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 100%, rgba(0, 242, 234, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 8px;
    position: relative;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tiktok-logo {
    width: 48px;
    height: 48px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

h1 {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.title-gradient {
    background: linear-gradient(90deg, #ff0050, #00f2ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.version-badge {
    font-size: 0.4rem;
    letter-spacing: 1px;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
}

.subtitle {
    text-align: center;
    font-size: 0.45rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    letter-spacing: 1px;
}

/* Features Badge */
.features-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    font-size: 0.4rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.feature-badge:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
}

.svg-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--text);
    stroke-width: 2;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.svg-icon.fill {
    fill: var(--text);
    stroke: none;
}

/* Input Group */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
}

.url-input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    letter-spacing: 1px;
    outline: none;
    transition: all 0.3s ease;
}

.url-input::placeholder {
    color: #444;
    font-size: 0.42rem;
}

.url-input:focus {
    border-color: rgba(255, 0, 80, 0.5);
    background: rgba(0, 0, 0, 0.7);
    box-shadow: 0 0 30px rgba(255, 0, 80, 0.08);
}

.btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 0.6rem;
    letter-spacing: 1px;
    padding: 14px 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.btn-download {
    background: #000000;
    border: 2px solid #ffffff;
    color: #ffffff;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.btn-download::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-download:hover {
    background: #1a1a1a;
    border-color: #ffffff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8);
    transform: translateY(-2px);
}

.btn-download:hover::before {
    left: 100%;
}

.btn-download:active {
    transform: scale(0.96);
    transition: all 0.1s ease;
    background: #000;
}

.btn-download:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: #1a1a1a;
    border-color: #333;
    color: #555;
    box-shadow: none;
}

/* Area Hasil */
.result-area {
    margin-top: 16px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.result-header {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.5rem;
    letter-spacing: 1px;
}

.result-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 0.4rem;
    letter-spacing: 0.5px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px 12px;
    backdrop-filter: blur(10px);
}

.detail-label {
    color: var(--text-muted);
    margin-bottom: 4px;
    font-size: 0.35rem;
}

.detail-value {
    color: var(--text);
    word-break: break-all;
}

.preview-media {
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 8px;
    max-height: 300px;
    overflow: hidden;
}

.preview-media img,
.preview-media video {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 8px;
}

.download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.dl-btn {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: var(--text);
    text-decoration: none;
    padding: 10px 16px;
    font-family: 'Press Start 2P', monospace;
    font-size: 0.45rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dl-btn:hover {
    background: rgba(255, 0, 80, 0.1);
    border-color: rgba(255, 0, 80, 0.4);
    box-shadow: 0 8px 25px rgba(255, 0, 80, 0.2);
    transform: translateY(-2px);
}

.dl-btn.hd-quality {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.06);
}

.dl-btn.hd-quality:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.error-message {
    color: var(--danger);
    text-align: center;
    font-size: 0.45rem;
    padding: 14px;
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 12px;
    background: rgba(255, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    letter-spacing: 1px;
}

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 0.5rem;
    padding: 20px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid #ff0050;
    border-right: 2px solid #00f2ea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.35rem;
    letter-spacing: 1px;
    border-radius: 12px;
    border: 1px solid;
}

.status-success {
    border-color: rgba(0, 255, 136, 0.4);
    color: var(--success);
    background: rgba(0, 255, 136, 0.05);
}

.status-error {
    border-color: rgba(255, 68, 68, 0.4);
    color: var(--danger);
    background: rgba(255, 0, 0, 0.05);
}

/* TikTok Logo Bottom */
.tiktok-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 0;
    margin-top: 8px;
}

.tiktok-brand svg {
    width: 28px;
    height: 28px;
}

.tiktok-brand-text {
    font-size: 0.4rem;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.footer-note {
    text-align: center;
    font-size: 0.35rem;
    color: #444;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.owner-badge {
    text-align: center;
    margin-top: 8px;
    font-size: 0.35rem;
    color: #555;
    letter-spacing: 1px;
}

.owner-badge a {
    color: #00f2ea;
    text-decoration: none;
    transition: color 0.3s;
}

.owner-badge a:hover {
    color: #ff0050;
}

/* FAQ Section */
.faq-section {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    position: relative;
    overflow: hidden;
}

.faq-title {
    font-size: 0.7rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 14px;
    position: relative;
}

details.faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 14px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

details.faq-item:last-child {
    border-bottom: none;
}

details.faq-item:hover {
    background: rgba(255, 255, 255, 0.02);
    margin: 0 -8px;
    padding: 14px 8px;
    border-radius: 12px;
}

summary.faq-question {
    font-size: 0.5rem;
    letter-spacing: 1px;
    color: #ccc;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    outline: none;
    gap: 12px;
}

summary.faq-question::-webkit-details-marker {
    display: none;
}

summary.faq-question::after {
    content: "+";
    font-size: 1.2rem;
    color: var(--text);
    font-weight: bold;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

details[open] summary.faq-question::after {
    content: "−";
    transform: rotate(180deg);
}

.faq-answer {
    margin-top: 12px;
    font-size: 0.42rem;
    color: #999;
    line-height: 2;
    letter-spacing: 0.5px;
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-answer ul {
    list-style: none;
    padding-left: 0;
}

.faq-answer ul li::before {
    content: ">";
    color: #555;
    margin-right: 8px;
}

/* Responsive */
@media (max-width: 500px) {
    .card {
        padding: 24px 16px;
        border-radius: 22px;
    }
    h1 {
        font-size: 0.8rem;
    }
    .btn {
        font-size: 0.5rem;
        padding: 12px 18px;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .tiktok-logo {
        width: 38px;
        height: 38px;
    }
    .feature-badge {
        font-size: 0.35rem;
        padding: 5px 10px;
    }
    .notification {
        top: 8px;
        right: 8px;
        left: 8px;
        padding: 12px 14px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-area[style*="display: flex"] {
    animation: fadeIn 0.4s ease-out;
}