/* ==================== PIW固有スタイル ==================== */
/* 共通スタイルは /tools/shared/styles/common.css を参照 */

/* common.cssの.info-box pをオーバーライド（説明文を16pxに統一） */
.info-box p {
    font-size: 16px;
}

/* プレビューコンテナ */
.preview-container {
    background: rgba(0, 0, 0, 0.5);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    margin: 30px 0;
    border: 2px solid rgba(145, 70, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.preview-emote-wall {
    max-width: 800px;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    position: relative;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.02),
        rgba(255, 255, 255, 0.02) 10px,
        transparent 10px,
        transparent 20px
    );
    border-radius: 12px;
    overflow: hidden;
    transform-style: flat;
    contain: paint;
}

.preview-image {
    position: absolute;
    pointer-events: none;
    transition: opacity 1s ease-out;
}

.preview-image.fade-out {
    opacity: 0 !important;
}

/* ガイド通知用スタイル */
#notificationGuideNotification .update-notification-version {
    color: #fff;
}

#soGuideNotification .update-notification-version {
    color: #fff;
}

#soGuideNotification .update-notification-btn {
    background: rgba(255, 193, 7, 0.85);
    border: 1px solid #cc9900;
    color: #333;
    font-weight: 700;
}

#soGuideNotification .update-notification-btn:hover {
    background: rgba(255, 193, 7, 1);
    border-color: #b38600;
}

@keyframes pulse-new {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 16px rgba(255, 136, 0, 0.8);
    }
}

.deprecation-notice {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.4);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 20px 0;
}

.auth-section-box .deprecation-notice p {
    margin: 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

/* Sound option styling */
.sound-option {
    transition: background 0.2s, border-color 0.2s;
    border: 2px solid transparent;
}

.sound-option.active {
    background: rgba(145, 70, 255, 0.25) !important;
    border-color: rgba(145, 70, 255, 0.6);
}

.sound-option input[type="radio"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.sound-preview-btn {
    padding: 2px 6px;
    background: rgba(145, 70, 255, 0.3);
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 10px;
    margin-left: 4px;
}

.sound-preview-btn:hover {
    background: rgba(145, 70, 255, 0.5);
}

/* OBS Guide Accordion */
#obsGuideToggle:hover {
    background: rgba(100, 100, 100, 0.25);
}

.obs-guide-img-container {
    position: relative;
    cursor: zoom-in;
}

.obs-guide-img:hover {
    transform: scale(2.5);
}

/* ==================== 共通設定ブロック ==================== */
.common-settings-box {
    margin-bottom: 24px;
    padding: 20px;
}

.common-settings-box > h3 {
    margin: 0;
    color: #00ff88;
    font-size: 16px;
}

/* ==================== excludeAccountsSection ==================== */
#excludeAccountsSection {
    margin-top: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

#excludeAccountsSection label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

#excludeAccountsSection textarea {
    width: calc(100% - 16px);
    height: 50px;
    padding: 8px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    resize: vertical;
}

#excludeAccountsSection .hint {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 4px;
}

/* ==================== OBSボリュームヒント ==================== */
.obs-volume-hint {
    padding: 12px;
    background: rgba(0, 80, 50, 0.35);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
}

.obs-volume-hint p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

/* ユーティリティクラスは common.css を参照 */

/* PIW固有ユーティリティ */
.input-narrow { width: 80px; }

/* ==================== セクションh3見出し ==================== */
h3.section-h3 {
    color: #00ff88;
    font-size: 16px;
    margin: 32px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 255, 136, 0.3);
}

h3.section-h3:first-of-type {
    margin-top: 16px;
}

/* ==================== info-boxバリエーション ==================== */
.info-box-section {
    margin-bottom: 24px;
    padding: 20px;
}

.info-box h4.section-title,
.info-box h3.section-title {
    margin-top: 0;
    color: #00ff88;
    font-size: 16px;
}

.info-box h3.section-title-warning {
    margin-top: 0;
    color: #ffc107;
}

.info-box .section-desc {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 20px;
}

/* ==================== アニメーションオプション ==================== */
.animation-option {
    border: 2px solid rgba(145, 70, 255, 0.3);
    border-radius: 12px;
    padding: 16px;
    background: rgba(145, 70, 255, 0.05);
}

.animation-option .anim-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.animation-option .anim-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.animation-option .anim-label {
    flex: 1;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
}

.anim-properties {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(145, 70, 255, 0.3);
}

.anim-properties .anim-desc {
    font-size: 16px;
    color: rgba(255,255,255,0.7);
    margin-top: 0;
    margin-bottom: 16px;
    line-height: 1.6;
}

p.hint-text {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 8px;
    margin-bottom: 0;
}

/* ==================== アニメーショングリッド ==================== */
.animation-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 32px;
}

/* ==================== スライダー関連 ==================== */
.slider-container.mb-16 {
    margin-bottom: 16px;
}

/* ==================== オプショングループ ==================== */
.option-group.mb-16 {
    margin-bottom: 16px;
}

.option-group.mb-0 {
    margin-bottom: 0;
}

.option-group.grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

/* ==================== フォーム要素共通 ==================== */
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: rgba(255,255,255,0.9);
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 14px;
}

.form-input-mono {
    font-family: 'Courier New', monospace;
}

.form-select {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(145, 70, 255, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
}

.form-textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(145, 70, 255, 0.3);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

/* ==================== チェックボックス/ラジオ共通 ==================== */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-text {
    font-size: 18px;
    font-weight: 600;
}

.checkbox-text-sm {
    font-size: 13px;
}

/* ==================== 通知セクション ==================== */
.notification-block {
    padding: 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.notification-block.mb-16 {
    margin-bottom: 16px;
}

.notification-options {
    display: none;
    margin-top: 12px;
}

.notification-options.with-indent {
    margin-left: 28px;
}

/* ==================== サウンドオプション ==================== */
.sound-options-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sound-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    cursor: pointer;
}

p.notification-sound-desc {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-top: 12px;
    margin-bottom: 8px;
    line-height: 1.5;
}
.notification-sound-desc a {
    color: #fff;
    text-decoration: underline;
    cursor: pointer;
}
.notification-sound-desc a:hover {
    color: rgba(255,255,255,0.8);
}

p.license-text {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin-top: 8px;
    margin-bottom: 0;
}

label.rotation-label,
label.rotation-option {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

div.hint-text {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin-top: 8px;
    margin-bottom: 0;
}

/* ==================== アコーディオン ==================== */
.accordion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.accordion-icon {
    color: rgba(255,255,255,0.6);
    font-size: 10px;
    transition: transform 0.2s;
}

.accordion-title {
    color: rgba(255,255,255,0.7);
    font-size: 13px;
}

.accordion-content {
    display: none;
    margin-top: 12px;
}

/* ==================== OBSガイド ==================== */
.obs-guide-wrapper {
    margin-top: 20px;
}

#obsGuideToggle {
    width: 100%;
    padding: 12px 16px;
    background: rgba(100, 100, 100, 0.15);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

#obsGuideArrow {
    transition: transform 0.3s;
}

#obsGuideContent {
    display: none;
    margin-top: 12px;
    padding: 16px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.obs-guide-step {
    margin-bottom: 20px;
}

.obs-guide-step-title {
    font-size: 14px;
    font-weight: 600;
    color: #00ff88;
    margin: 0 0 8px 0;
}

.obs-guide-img-container {
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.1);
}

.obs-guide-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.obs-guide-complete {
    font-size: 12px;
    color: rgba(0, 255, 136, 0.8);
    margin: 16px 0 8px 0;
}

.obs-guide-tip {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    border-left: 3px solid rgba(145, 70, 255, 0.6);
}

.obs-guide-tip-title {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    margin: 0 0 6px 0;
}

.obs-guide-tip-text {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin: 0 0 4px 0;
}

.obs-guide-tip-note {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

.obs-guide-hover-hint {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    margin: 8px 0 0 0;
    text-align: center;
}

/* ==================== フッター ==================== */
.step-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
}

.step-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.step-footer a:hover {
    color: #9146ff;
}

/* ==================== ボタンセンター ==================== */
.btn-center {
    text-align: center;
    margin-top: 30px;
}

/* ==================== エモート比率スライダー ==================== */
.emote-ratio-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.emote-ratio-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.emote-ratio-label {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
    white-space: nowrap;
}

.emote-ratio-slider {
    flex: 1;
    cursor: pointer;
}

.emote-ratio-value-wrap {
    text-align: center;
    margin-bottom: 4px;
}

.emote-ratio-value {
    font-size: 14px;
    color: #00ff88;
    font-weight: bold;
}

.info-box .emote-ratio-desc {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
    margin: 0;
}

/* ==================== プレビューコンテナ ==================== */
.preview-placeholder {
    color: rgba(255,255,255,0.5);
    margin-top: 130px;
}

.preview-btn {
    margin-top: 15px;
}

/* ==================== 役割チェックボックス ==================== */
.role-checkbox-item {
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.role-checkbox-item.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.role-checkbox {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin: 0;
}

.role-checkbox.disabled {
    cursor: not-allowed;
}

.role-label {
    font-size: 14px;
}

/* ==================== オフセットスライダー ==================== */
.offset-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.offset-arrow {
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.offset-slider {
    flex: 1;
}

.offset-value {
    min-width: 50px;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

/* ==================== 区切り線 ==================== */
.section-divider {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(145, 70, 255, 0.3);
}

.section-divider-light {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-divider-white {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* ==================== サブセクションタイトル ==================== */
.subsection-title {
    margin-top: 0;
    margin-bottom: 12px;
    color: #00ff88;
    font-size: 18px;
}

.subsection-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 16px;
}

/* ==================== ヒントボックス ==================== */
.hint-box {
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(0, 80, 50, 0.25);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 8px;
}

.hint-box-title {
    font-size: 14px;
    color: rgba(255,255,255,0.85);
    margin: 0 0 8px 0;
}

.hint-box-list {
    margin: 0;
    padding-left: 20px;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
}

.hint-box-list .highlight {
    color: rgba(0, 255, 136, 0.9);
}

/* ==================== 警告ボックス ==================== */
.warning-box {
    display: none;
    padding: 12px;
    background: rgba(255, 165, 0, 0.1);
    border: 1px solid rgba(255, 165, 0, 0.3);
    border-radius: 8px;
    margin-top: 8px;
}

.warning-box p {
    font-size: 16px;
    color: #ffb84d;
    margin: 0;
}

.warning-box button {
    margin-top: 8px;
    padding: 8px 16px;
    background: #9146ff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

/* ==================== APIヒントボックス ==================== */
.api-hint-box {
    margin: 12px 0;
    padding: 12px;
    background: rgba(0, 80, 50, 0.35);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
}

.api-hint-box p {
    margin: 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

/* ==================== フォントサイズスライダー ==================== */
.fontsize-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fontsize-slider {
    flex: 1;
}

.fontsize-value {
    min-width: 50px;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}

/* Step 2 Tab Navigation */
.step2-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    padding: 0 8px;
    position: relative;
    overflow: hidden;
    padding-bottom: 0;
}

.step2-tab {
    flex: 1;
    padding: 14px 20px;
    background: rgba(40, 40, 60, 0.6);
    border: 1px solid rgba(145, 70, 255, 0.2);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    top: 4px;
    z-index: 1;
}

.step2-tab:hover {
    background: rgba(60, 60, 80, 0.7);
    color: rgba(255, 255, 255, 0.7);
}

.step2-tab.active {
    background: rgba(145, 70, 255, 0.15);
    border-color: rgba(145, 70, 255, 0.4);
    color: #fff;
    top: 0;
    z-index: 2;
}

.step2-tab-content {
    background: rgba(145, 70, 255, 0.15);
    border: 1px solid rgba(145, 70, 255, 0.4);
    border-radius: 0 0 16px 16px;
    padding: 24px;
    margin-top: -1px;
    position: relative;
    z-index: 2;
}

/* Step 1 Auth Section */
.auth-section-box {
    margin: 24px 0;
    padding: 24px;
    border: 2px dashed rgba(145, 70, 255, 0.4);
    border-radius: 16px;
    background: rgba(145, 70, 255, 0.03);
    backdrop-filter: blur(10px);
    text-align: center;
}

.auth-section-box p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 12px 0;
}

.auth-section-title {
    margin-top: 0;
    color: #9146ff;
    font-size: 22px;
}

.auth-section-input {
    margin: 16px 8px 16px 0;
    width: 100%;
    max-width: 500px;
}

.auth-section-file-input {
    margin: 16px 8px 16px 0;
    padding: 12px;
    border: 1px solid rgba(145, 70, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    cursor: pointer;
}

.auth-section-result {
    margin-top: 16px;
    display: none;
}

.auth-divider {
    text-align: center;
    margin: 30px 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 18px;
    font-weight: 600;
}

.auth-button-container {
    text-align: center;
    margin-bottom: 30px;
}

.auth-button-large {
    padding: 20px 40px;
    line-height: 1.6;
}

#authStatus {
    margin: 20px 0;
}

#tokenDisplay {
    display: none;
    margin-top: 30px;
}

.token-display-box {
    text-align: center;
}

.token-display-title {
    margin-top: 0;
    color: #00ff88;
}

.token-display-button-container {
    text-align: center;
    margin-top: 30px;
}

.auth-button-text {
    display: block;
}

.auth-button-line {
    display: block;
}

.twitch-btn-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

.btn-secondary {
    background: linear-gradient(45deg, #17a2b8, #138496);
}
