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

body, html {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
    background-color: transparent;
}

/* Landing Page Wrapper (Paging Card) */
body:has(#setup-container:not(.hidden)) {
    background-color: #f3f4f6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
}

.hidden {
    display: none !important;
}

.card-wrapper {
    width: 100%;
    max-width: 460px;
}

.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.card-header {
    text-align: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.card-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6366f1;
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 9999px;
    margin-bottom: 8px;
}

.card-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
}

.input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    overflow: hidden;
}

.input-addon {
    padding: 8px 12px;
    background: #f9fafb;
    border-right: 1px solid #d1d5db;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: none;
    outline: none;
    font-size: 0.9rem;
    color: #111827;
    background: transparent;
}

.form-input::placeholder {
    color: #9ca3af;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    padding: 10px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 15px;
    height: 15px;
    accent-color: #111827;
}

.btn-group {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.btn {
    flex: 1;
    padding: 9px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: center;
}

.btn-primary {
    background: #111827;
    color: #ffffff;
    border: 1px solid #111827;
}

.btn-primary:hover {
    background: #000000;
}

.btn-outline {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-outline:hover {
    background: #f9fafb;
}

.generated-box {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.copy-input-group {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.copy-input-group .form-input {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
}

.btn-copy {
    flex: 0 0 70px;
    background: #4b5563;
    color: #ffffff;
    border: 1px solid #4b5563;
}

.btn-copy:hover {
    background: #374151;
}

.help-text {
    display: block;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 6px;
}

.card-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.creator-label {
    font-size: 0.8rem;
    color: #4b5563;
    margin-bottom: 6px;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 0.78rem;
}

.social-links a {
    color: #4b5563;
    font-weight: 500;
    text-decoration: underline;
}

.social-links a:hover {
    color: #111827;
}

.copyright {
    font-size: 0.72rem;
    color: #9ca3af;
    margin-top: 8px;
}

/* Background transparan untuk mode OBS Overlay */
body:has(#overlay-container:not(.hidden)) {
    background: transparent;
    margin: 0;
    padding: 0;
    overflow: hidden;
}



/* OVERLAY CONTAINER (OBS TRANSPARENT) */

.overlay-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    pointer-events: none;
    box-sizing: border-box;
    overflow: hidden;
}

/* STATUS BADGE */
.status-badge {
    position: fixed;
    top: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    transition: opacity 0.5s ease;
    z-index: 100;
}

/* CHAT BOX */
.chat-box {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
    max-height: 98vh;
    width: 100%;
    max-width: 480px;
    overflow: hidden;
}

/* CHAT ITEM KHAS TWITCH */
.chat-item {
    display: block;
    padding: 2px 0;
    background: transparent !important;
    animation: twitchChatIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
    word-break: break-word;
    line-height: 1.35;
}

/* Foto Profil (Disembunyikan karena ditiadakan) */
.avatar {
    display: none !important;
}

/* Konten Chat */
.chat-content {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #efeff1;
    text-shadow: 
        1px 1px 0px #000, 
        -1px -1px 0px #000, 
        1px -1px 0px #000, 
        -1px 1px 0px #000, 
        0px 1px 0px #000, 
        0px -1px 0px #000, 
        1px 0px 0px #000, 
        -1px 0px 0px #000,
        0px 2px 4px rgba(0, 0, 0, 0.9);
}

/* Badges */
.badge-img {
    height: 18px;
    width: 18px;
    vertical-align: -3px;
    margin-right: 4px;
    border-radius: 2px;
    display: inline-block;
}

/* Username */
.username {
    font-weight: 800;
    margin-right: 4px;
}

/* Pesan */
.message {
    color: #ffffff;
    font-weight: 600;
}

/* EVENT KHUSUS: GIFT / FOLLOW / SHARE */
.event-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    background: transparent !important;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    font-weight: 800;
    animation: twitchChatIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
    text-shadow: 
        1px 1px 0px #000, 
        -1px -1px 0px #000, 
        1px -1px 0px #000, 
        -1px 1px 0px #000, 
        0 2px 4px rgba(0,0,0,0.9);
}

.event-item.gift {
    color: #ff5e97;
}

.event-item.follow {
    color: #00f2fe;
}

.event-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    vertical-align: middle;
}

/* ANIMATIONS KHAS TWITCH SLIDE UP DARI BAWAH */
@keyframes twitchChatIn {
    0% {
        opacity: 0;
        transform: translateY(16px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes chatFadeOut {
    to {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
        padding: 0;
        margin: 0;
    }
}
