:root {
    /* TikTok Palette */
    --tik-pink: #FE2C55;
    --tik-blue: #25F4EE;
    --bg-dark: #121212;
    --card-dark: #1E1E1E;
    --text-light: #FFFFFF;
    --text-gray: #AAAAAA;
    --border-dark: #333333;
    
    /* Grid Background Pattern */
    --grid-bg: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
                 linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image: var(--grid-bg);
    background-size: 50px 50px;
    color: var(--text-light);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px 15px;
}

.container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* === Main Card === */
.card {
    background: var(--card-dark);
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.logo-container {
    margin-bottom: 1rem;
    color: var(--tik-pink);
}

.tiktok-logo {
    width: 60px;
    height: auto;
}

.title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.highlight {
    color: var(--tik-pink);
}

.subtitle {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

/* === Form Elements === */
.input-group {
    position: relative;
    margin-bottom: 1rem;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 1.1rem;
}

input[type="url"] {
    width: 100%;
    padding: 16px 16px 16px 48px; /* Padding kiri untuk ikon */
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    font-size: 1rem;
    background: #2A2A2A;
    color: var(--text-light);
    outline: none;
    transition: border-color 0.3s;
}

input[type="url"]::placeholder {
    color: #666;
}

input[type="url"]:focus {
    border-color: var(--tik-pink);
}

button {
    width: 100%;
    padding: 16px;
    background-color: var(--tik-pink);
    color: #fff;
    border: none;
    border-radius: 30px; /* Rounded penuh seperti contoh */
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(254, 44, 85, 0.3);
    transition: transform 0.2s;
}

button:hover {
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

/* === Features Grid === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.feature-item span {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 0.5rem;
    color: var(--text-gray);
    letter-spacing: 0.5px;
}

.icon-circle {
    width: 50px;
    height: 50px;
    background-color: rgba(254, 44, 85, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    color: var(--tik-pink);
    font-size: 1.2rem;
    border: 2px solid transparent;
}

/* === How To Card === */
.how-to-card {
    text-align: left;
    padding: 1.5rem 2rem;
}

.how-to-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.steps-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.step-number {
    width: 30px;
    height: 30px;
    background-color: var(--tik-pink);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-item p {
    font-size: 0.95rem;
    color: var(--text-light);
}

/* === Footer === */
footer {
    text-align: center;
    color: #444;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1px;
    margin-top: auto;
    padding-bottom: 1rem;
}

/* === Result Area & Loader (Tidak Berubah) === */
.result {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #2A2A2A;
    border-radius: 8px;
    border: 1px solid var(--border-dark);
    text-align: left;
}

.result h3 { color: var(--text-gray); font-size: 0.9rem; margin-bottom: 0.5rem; }

.hidden { display: none; }

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 0.85rem;
    color: var(--text-light);
    font-family: monospace;
}

.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
