:root {
    --bg-color: #f9f9f9;
    --text-primary: #0f0f0f;
    --text-secondary: #606060;
    --border-color: #e5e5e5;
    --accent-color: #065fd4;
    --panel-bg: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Noto Sans JP', -apple-system, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.top-header {
    height: 56px;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    flex-shrink: 0;
}

.app-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 360px;
    background: var(--panel-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon-svg {
    width: 30px;
    height: 20px;
    display: block;
}

.brand h1 {
    font-size: 20px;
    font-weight: 500;
    margin: 0;
    letter-spacing: -0.5px;
    font-family: 'YouTube Sans', 'Roboto', 'Noto Sans JP', sans-serif;
}

/* Tabs */
.tabs {
    display: flex;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 14px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    border-radius: 0;
    transition: color 0.2s;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(0,0,0,0.02);
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom: 2px solid var(--accent-color);
}

/* Scrollable Form */
.form-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 24px;
}

.form-scroll-area::-webkit-scrollbar {
    width: 8px;
}
.form-scroll-area::-webkit-scrollbar-thumb {
    background: #cccccc;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary);
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 1px var(--accent-color);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Custom File Upload */
.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    background: #f9f9f9;
    border: 1px dashed #cccccc;
    border-radius: 4px;
    padding: 12px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.file-upload-wrapper:hover {
    border-color: var(--accent-color);
    background: #f0f7ff;
}
.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    opacity: 0;
    cursor: pointer;
}
.file-upload-text {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px !important;
    color: var(--text-primary) !important;
    margin-top: 4px;
}
.checkbox-label input {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.checkbox-custom {
    display: none;
}

/* Buttons */
.actions {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.btn {
    width: 100%;
    padding: 10px 20px;
    border: none;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.btn-primary {
    background: #0f0f0f;
    color: white;
}

.btn-primary:hover {
    background: #272727;
}

.btn img {
    width: 18px;
    height: 18px;
}

/* Preview Area */

.preview-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    position: relative;
    padding: 40px;
    overflow-y: auto;
}

.preview-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-soft), 0 1px 3px rgba(0,0,0,0.05);
    padding: 40px 30px;
    min-width: 600px;
    max-width: 100%;
    border: 1px solid rgba(0,0,0,0.03);
    position: relative;
    transition: all 0.3s ease;
}

/* YouTube Comment Style */
.capture-container {
    background: white;
    width: 100%;
    max-width: 600px;
    position: relative;
    padding: 40px;
}

.pinned-header {
    display: flex;
    align-items: center;
    color: #606060;
    font-size: 12px;
    margin-bottom: 12px;
    padding-left: 28px;
    font-family: 'Roboto', 'Noto Sans JP', sans-serif;
}
.pin-icon { width: 14px; height: 14px; margin-right: 8px; }
.more-icon { width: 24px; height: 24px; margin-left: auto; }

.comment-main { display: flex; position: relative; font-family: 'Roboto', 'Noto Sans JP', sans-serif; }
.avatar-col { margin-right: 16px; padding-top: 2px; }
.avatar-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.content-col { flex: 1; }

.author-row { display: flex; align-items: center; margin-bottom: 6px; font-size: 13px; }
.author-name { font-weight: 500; margin-right: 4px; color: #0f0f0f; }
.badge { display: flex; align-items: center; margin-right: 4px; }
.badge img { display: block; }
.time-text { color: #606060; font-size: 12px; margin-left: 2px; }

.comment-text { font-size: 14px; line-height: 1.5; word-break: break-word; margin-bottom: 10px; color: #0f0f0f; }


.super-thanks-pill {
    display: inline-block;
    padding: 2px 10px 2px 6px;
    border-radius: 16px;
    font-weight: 500;
    margin-right: 6px;
    font-size: 13px;
    vertical-align: middle;
    white-space: nowrap; 
    line-height: 20px;
    height: 24px;
}

.pill-icon {
    display: inline-block;
    margin-right: 4px;
    vertical-align: top;
    margin-top: 2px;
}
/* Removed display: block on svg to allow html2canvas to render it */

#previewAmount {
    display: inline-block;
    vertical-align: top;
    line-height: 20px;
}

#previewText {
    display: inline;
    vertical-align: baseline;
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}
.action-row { display: flex; align-items: center; color: #0f0f0f; font-size: 12px; }
.action-item { display: flex; align-items: center; }
.action-icon { width: 24px; height: 24px; display: block; }
.likes-count { color: #606060; margin-left: 2px; margin-right: 16px; }

.creator-heart-wrapper {
    position: relative;
    width: 24px; height: 24px;
    margin-left: 12px; margin-right: 16px;
    display: flex; align-items: center; justify-content: center;
}
.creator-avatar { width: 16px; height: 16px; border-radius: 50%; object-fit: cover; }
.heart-badge-wrapper { position: absolute; bottom: 2px; right: 2px; width: 12px; height: 12px; }
.heart-badge { display: block; }

.reply-text { font-weight: 500; font-size: 12px; }

.replies-section {
    display: flex; align-items: center;
    margin-top: 12px; margin-left: 56px;
    font-family: 'Roboto', 'Noto Sans JP', sans-serif;
}
.reply-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.replies-dot { margin: 0 6px; color: #0f0f0f; font-size: 14px; }
.replies-text { font-weight: 500; color: #0f0f0f; font-size: 14px; }
.chevron-down { width: 20px; height: 20px; margin-left: 4px; display: block; }

.fake-logo-overlay {
    position: absolute; bottom: 10px; right: 10px;
    font-size: 24px; font-weight: bold; color: rgba(0, 0, 0, 0.15);
    transform: rotate(-10deg); pointer-events: none; z-index: 10;
    font-family: 'Arial Black', sans-serif;
}

/* Live Super Chat Styles */
#captureAreaLive { padding: 0; background: transparent; }
.live-superchat-block {
    border-radius: 12px; overflow: hidden;
    width: 100%; max-width: 400px;
    font-family: 'Roboto', 'Noto Sans JP', sans-serif;
    display: flex; flex-direction: column;
    box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12), 0 3px 1px -2px rgba(0,0,0,.2);
}
.live-header {
    display: flex; align-items: center;
    padding: 10px 16px 2px;
}
.live-avatar { width: 28px; height: 28px; border-radius: 50%; margin-right: 12px; object-fit: cover; }
.live-header-content { flex: 1; display: flex; align-items: center; }
.live-header-info { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.live-name { font-weight: 500; }
.live-amount { font-weight: 500; }
.live-body {
    padding: 4px 16px 12px; font-size: 14px;
    word-break: break-word; line-height: 1.4;
}

@media (max-width: 900px) {
    .app-layout { flex-direction: column; overflow: visible; height: auto; }
    .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border-color); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
    .form-scroll-area { overflow-y: visible; padding-bottom: 40px; }
    .preview-area { padding: 20px; }
    .preview-wrapper { min-width: 100%; padding: 20px; }
}
