/*
 * 共通CSS基盤
 * 大原則: PIWが基本。このファイルはPIWのstyles.phpから抽出。
 * 対象: PIW, VC, CM および将来のツール
 */

/* ==================== CSS変数 ==================== */
:root {
    /* カラーパレット */
    --color-primary: #9146ff;
    --color-primary-dark: #7c3aed;
    --color-primary-light: #bf9dff;
    --color-secondary: #00ff88;
    --color-secondary-dark: #00cc6a;
    --color-error: #ff6b9d;
    --color-error-dark: #f44336;
    --color-warning: #ffc107;
    --color-info: #17a2b8;

    /* 背景 */
    --bg-base: #0a0a0f;
    --bg-container: rgba(255, 255, 255, 0.05);
    --bg-input: rgba(0, 0, 0, 0.3);
    --bg-step: rgba(255, 255, 255, 0.03);
    --bg-step-active: rgba(145, 70, 255, 0.05);

    /* テキスト */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-hint: rgba(255, 255, 255, 0.4);

    /* ボーダー */
    --border-primary: rgba(145, 70, 255, 0.3);
    --border-secondary: rgba(255, 255, 255, 0.2);
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --border-radius-xl: 24px;

    /* シャドウ */
    --shadow-container: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 100px rgba(145, 70, 255, 0.1);
    --shadow-btn: 0 8px 25px rgba(145, 70, 255, 0.3);
    --shadow-btn-hover: 0 12px 35px rgba(145, 70, 255, 0.5);

    /* トランジション */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-cubic: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* フォント */
    --font-main: 'Inter', 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* ==================== グローバルリセット ==================== */
* {
    box-sizing: border-box;
}

html {
    background: var(--bg-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: var(--bg-base);
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 25%, #16213e 50%, #0f0f1e 100%);
    background-attachment: fixed;
    line-height: 1.6;
    min-height: 100vh;
    color: var(--text-primary);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(145, 70, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 107, 157, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ==================== コンテナ ==================== */
.container {
    background: var(--bg-container);
    padding: 40px;
    border-radius: var(--border-radius-xl);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(145, 70, 255, 0.2);
    box-shadow: var(--shadow-container), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-secondary), var(--color-error), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

/* ==================== タイポグラフィ ==================== */
h1 {
    color: var(--text-primary);
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(145, 70, 255, 0.5);
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 40px;
    font-weight: 300;
}

code {
    background: rgba(0, 0, 0, 0.5);
    padding: 3px 8px;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-mono);
    color: var(--color-secondary);
    font-size: 14px;
}

ul {
    margin: 16px 0;
    padding-left: 24px;
}

li {
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.85);
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ==================== ステップシステム ==================== */
.step {
    margin: 30px 0;
    padding: 32px;
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius-lg);
    display: none;
    background: var(--bg-step);
    backdrop-filter: blur(10px);
    transition: all var(--transition-cubic);
    position: relative;
    overflow: hidden;
}

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

.step.active {
    display: block;
    border-color: var(--color-primary);
    background: var(--bg-step-active);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 50px rgba(145, 70, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.step.active::before {
    left: 100%;
}

.step h2 {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.step h3 {
    color: var(--color-primary-light);
    font-size: 20px;
    font-weight: 600;
    margin: 24px 0 12px 0;
    text-shadow: 0 0 20px rgba(191, 157, 255, 0.3);
}

.step-indicator {
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 1px;
}

/* ==================== ボタン ==================== */
.btn {
    background: linear-gradient(45deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    margin: 12px 8px;
    transition: all var(--transition-cubic);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-btn);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn-hover);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid var(--border-secondary);
}

.btn-secondary:hover {
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.1));
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.1);
}

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-center {
    text-align: center;
    margin-top: 30px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--color-primary), #7b2cbf);
}

.btn-info {
    background: linear-gradient(45deg, var(--color-info), #138496);
    margin-top: 12px;
}

/* ==================== 再認証メッセージ ==================== */
.reauth-message {
    margin-top: 20px;
    padding: 16px;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    color: var(--color-warning);
    font-size: 14px;
    text-align: center;
}

/* ==================== URL結果 ==================== */
.url-result {
    margin-top: 30px;
}

.url-input-box {
    margin: 20px 0;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
}

.url-input {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-secondary);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: var(--font-mono);
}

.copy-success {
    margin-top: 12px;
    color: var(--color-secondary);
    font-size: 14px;
}

/* ==================== フォーム要素 ==================== */
input[type="text"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-primary);
    border-radius: var(--border-radius-md);
    font-size: 16px;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: all var(--transition-normal);
    font-family: var(--font-main);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(145, 70, 255, 0.1);
    box-shadow: 0 0 20px rgba(145, 70, 255, 0.3);
}

input::placeholder {
    color: var(--text-hint);
}

textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-primary);
    border-radius: var(--border-radius-md);
    font-size: 16px;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: all var(--transition-normal);
    font-family: var(--font-main);
    resize: vertical;
    min-height: 100px;
}

textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(145, 70, 255, 0.1);
    box-shadow: 0 0 20px rgba(145, 70, 255, 0.3);
}

select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--border-primary);
    border-radius: var(--border-radius-md);
    font-size: 16px;
    background: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 20px rgba(145, 70, 255, 0.3);
}

.form-group {
    margin: 24px 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 15px;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

/* ==================== スライダー ==================== */
.slider-container {
    margin: 24px 0;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.slider-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    font-size: 16px;
}

.slider-value {
    color: var(--color-primary-light);
    font-weight: 700;
    font-size: 20px;
    text-shadow: 0 0 10px rgba(191, 157, 255, 0.5);
}

.slider-wrapper {
    position: relative;
    margin-bottom: 8px;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

input[type="range"]:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(0, 255, 136, 0.5);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.6);
    transition: all var(--transition-normal);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.9);
    background: linear-gradient(135deg, #00ff88, #00ffaa);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.6);
    transition: all var(--transition-normal);
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.9);
    background: linear-gradient(135deg, #00ff88, #00ffaa);
}

.slider-limits {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

/* ==================== 情報ボックス ==================== */
.info-box {
    background: rgba(0, 255, 136, 0.1);
    border-left: 4px solid var(--color-secondary);
    padding: 20px;
    margin: 20px 0;
    border-radius: var(--border-radius-md);
    backdrop-filter: blur(10px);
    position: relative;
}

.info-box h3 {
    margin-top: 0;
    color: var(--color-secondary);
}

.info-box h4 {
    color: rgba(255, 255, 255, 0.9);
    margin: 16px 0 8px 0;
}

.info-box p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.7;
    font-size: 14px;
}

.info-box p + p {
    margin-top: 12px;
}

.info-box-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: var(--color-warning);
}

.info-box-warning h3 {
    color: var(--color-warning);
}

.info-box-error {
    background: rgba(244, 67, 54, 0.1);
    border-left-color: var(--color-error-dark);
}

.info-box-purple {
    background: rgba(145, 70, 255, 0.08);
    border-color: rgba(145, 70, 255, 0.4);
}

/* ==================== ガイドアイテム ==================== */
.guide-item {
    margin-bottom: 12px;
}

.guide-item-last {
    margin-bottom: 0;
}

.guide-item-title {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 4px 0;
}

.guide-item-desc {
    color: var(--text-secondary);
    margin: 0 0 0 24px;
}

.info-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--color-secondary);
    padding: 20px;
    margin: 20px 0;
    border-radius: var(--border-radius-md);
    color: var(--color-secondary);
    font-weight: 600;
}

.info-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid var(--color-error-dark);
    padding: 20px;
    margin: 20px 0;
    border-radius: var(--border-radius-md);
    color: var(--color-error-dark);
    font-weight: 600;
}

/* ==================== オプショングループ ==================== */
.option-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.option-item {
    position: relative;
    border: 2px solid var(--border-primary);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-normal);
    background: rgba(0, 0, 0, 0.2);
}

.option-item:hover {
    border-color: var(--color-primary);
    background: rgba(145, 70, 255, 0.1);
    transform: translateY(-2px);
}

.option-item input[type="radio"] {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 1;
}

.option-item label {
    display: block;
    padding: 20px 20px 20px 52px;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
}

/* ==================== 認証通知システム ==================== */
#authNotifications {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.auth-notification {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(145, 70, 255, 0.5);
    border-radius: var(--border-radius-md);
    padding: 16px 20px;
    min-width: 300px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(145, 70, 255, 0.3);
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.auth-notification.success {
    border-color: rgba(0, 255, 136, 0.5);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(0, 255, 136, 0.3);
}

.auth-notification.error {
    border-color: rgba(255, 107, 157, 0.5);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 107, 157, 0.3);
}

.auth-notification.fadeOut {
    animation: fadeOut 0.5s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.auth-notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.auth-notification-content {
    flex: 1;
}

.auth-notification-service {
    font-weight: 700;
    color: var(--color-primary);
}

.auth-notification.success .auth-notification-service {
    color: var(--color-secondary);
}

.auth-notification.error .auth-notification-service {
    color: var(--color-error);
}

.auth-notification-username {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 4px;
}

/* ==================== 更新通知バー ==================== */
.update-notification {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.15), rgba(19, 132, 150, 0.1));
    border: 1px solid rgba(23, 162, 184, 0.3);
    border-radius: var(--border-radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    animation: slideDown 0.5s ease;
}

.update-notification-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.update-notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.update-notification-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.update-notification-version {
    color: var(--color-info);
    font-weight: 700;
}

.update-notification-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.update-notification-btn {
    padding: 6px 14px;
    background: rgba(23, 162, 184, 0.2);
    border: 1px solid rgba(23, 162, 184, 0.4);
    border-radius: var(--border-radius-sm);
    color: var(--color-info);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.update-notification-btn:hover {
    background: rgba(23, 162, 184, 0.3);
    border-color: rgba(23, 162, 184, 0.6);
}

.update-notification-close {
    padding: 4px 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: color var(--transition-normal);
}

.update-notification-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ==================== モーダル ==================== */
.update-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.update-details-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    padding: 32px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.update-details-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: color var(--transition-normal);
}

.update-details-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ==================== フッターナビ ==================== */
.footer-nav {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-primary);
}

.footer-nav-spread {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition-normal);
}

.nav-link:hover {
    color: var(--color-primary);
    text-decoration: none;
}

/* ==================== バッジ ==================== */
.badge-new {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #ff4444 0%, #ff8800 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    animation: pulse-new 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.5);
    vertical-align: middle;
}

/* ==================== 汎用モーダル ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 16px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content-md {
    max-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
    margin: 0;
    color: var(--color-secondary);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: right;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #fff;
}

.modal-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ==================== 通知セクション ==================== */
.notification-section {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(145, 70, 255, 0.05);
    border: 1px solid var(--border-primary);
    border-radius: var(--border-radius-md);
}

.notification-section:last-child {
    margin-bottom: 0;
}

.notification-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.notification-label-text {
    font-weight: 600;
}

.notification-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin: 4px 0 12px 26px;
}

.notification-options {
    display: none;
    margin-left: 26px;
}

.notification-options.active {
    display: block;
}

/* ==================== サウンドオプション ==================== */
.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;
    border: 2px solid transparent;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

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

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

.sound-preview-btn {
    background: rgba(145, 70, 255, 0.3);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

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

/* ==================== チェックボックス ==================== */
.checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== ライセンステキスト ==================== */
.license-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ==================== 除外アカウント ==================== */
.exclude-accounts-box {
    margin-top: 20px;
    padding: 16px;
    background: rgba(100, 100, 100, 0.1);
    border: 1px solid var(--border-secondary);
    border-radius: var(--border-radius-md);
}

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

.exclude-accounts-textarea {
    width: calc(100% - 16px);
    height: 50px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-secondary);
    border-radius: var(--border-radius-sm);
    color: #fff;
    font-size: 12px;
    resize: vertical;
}

.exclude-accounts-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

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

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

/* ==================== アコーディオン ==================== */
.accordion-toggle {
    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 var(--transition-fast);
}

.accordion-toggle:hover {
    background: rgba(100, 100, 100, 0.25);
}

.accordion-arrow {
    transition: transform var(--transition-normal);
}

.accordion-arrow.open {
    transform: rotate(180deg);
}

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

.accordion-content.open {
    display: block;
}

/* ==================== OBSガイドステップ ==================== */
.obs-guide-step {
    margin-bottom: 20px;
}

.obs-guide-step-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-secondary);
    margin: 0 0 8px 0;
}

.obs-guide-img-container {
    overflow: hidden;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: zoom-in;
}

.obs-guide-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-normal);
}

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

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

.obs-guide-hover-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin: 8px 0 0 0;
    text-align: center;
}

.obs-volume-hint {
    padding: 12px;
    background: rgba(0, 80, 50, 0.35);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-radius: 8px;
    margin-bottom: 16px;
}

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

.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;
}

#obsGuideToggle:hover {
    background: rgba(100, 100, 100, 0.25);
}

#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-tip {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid rgba(145, 70, 255, 0.6);
}

.obs-guide-tip-title {
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: rgba(255, 255, 255, 0.9);
}

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

.obs-guide-tip-note {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

/* ==================== ティップボックス ==================== */
.tip-box {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    border-left: 3px solid rgba(145, 70, 255, 0.6);
}

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

.tip-box-text {
    font-size: 11px;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
}

.tip-box-note {
    font-size: 10px;
    color: var(--text-muted);
    margin: 0;
}

/* ==================== ユーティリティクラス ==================== */
/* マージン */
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }

/* パディング */
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }

/* 表示 */
.hidden { display: none; }
.text-center { text-align: center; }
.d-block { display: block; }

/* disabled状態 */
.disabled-half { opacity: 0.5; }
.info-box.disabled { opacity: 0.6; }

/* ==================== アニメーション ==================== */
@keyframes shimmer {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

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

@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);
    }
}

/* ==================== 認証ステータス ==================== */
.auth-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.auth-status-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.auth-status-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-status-success {
    color: var(--color-secondary);
}

.auth-status-warning {
    color: #ffb84d;
}

.auth-status-muted {
    color: var(--text-secondary);
}

.auth-status-icon {
    font-size: 16px;
}

.btn-auth-primary {
    padding: 8px 16px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
}

.btn-auth-primary:hover {
    background: var(--color-primary-dark);
}

.btn-auth-secondary {
    padding: 4px 10px;
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
}

.btn-auth-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.8);
}

/* 認証ステータスボックス */
.auth-status-box-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.auth-status-box-warning {
    background: rgba(255, 184, 77, 0.1);
    border: 1px solid rgba(255, 184, 77, 0.3);
}

.auth-status-box-muted {
    background: rgba(145, 70, 255, 0.1);
    border: 1px solid rgba(145, 70, 255, 0.3);
}

/* ==================== タイマーグループ ==================== */
.timer-group {
    margin-bottom: 12px;
    background: rgba(0,0,0,0.2);
    border: 2px solid rgba(145, 70, 255, 0.3);
    border-radius: 8px;
}

/* 共通タイマーグループ（別色ボーダー） */
.timer-group-common {
    border-color: rgba(0, 200, 150, 0.5);
    margin-bottom: 16px;
}

.timer-group-common .timer-group-header {
    background: rgba(0, 200, 150, 0.15);
}

.timer-group-name-fixed {
    font-weight: 600;
    color: rgba(0, 220, 170, 1);
    white-space: nowrap;
}

.timer-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(145, 70, 255, 0.1);
    cursor: pointer;
}

.timer-group-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.timer-group-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

input.timer-group-name-input {
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    font-size: 14px;
    width: 200px;
    flex-shrink: 0;
}

.timer-group-preview {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 0 16px;
}

.timer-group-enabled-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.timer-group-enabled-checkbox {
    width: 16px;
    height: 16px;
}

.timer-group-enabled-text {
    font-size: 13px;
}

.timer-group-content {
    padding: 16px;
    display: none;
}

.timer-group-content.open {
    display: block;
}

.timer-group-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.timer-group-field {
    margin-bottom: 12px;
}

.timer-group-label {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 4px;
}

.timer-group-input {
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    font-size: 14px;
}

/* ==================== 更新モーダル ==================== */
.update-modal-title {
    color: var(--color-primary-light);
    margin-top: 0;
}

.update-modal-section {
    margin-top: 24px;
}

.update-modal-date {
    color: var(--color-info);
    font-size: 18px;
}

.update-modal-list {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
}

.update-modal-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.update-modal-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ==================== 暗号化モーダル ==================== */
.encryption-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.encryption-modal-content {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.encryption-modal-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #333;
}

.encryption-modal-text {
    margin: 0 0 16px 0;
    line-height: 1.6;
    color: #666;
}

.encryption-modal-field {
    margin-bottom: 20px;
}

.encryption-modal-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.encryption-modal-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-mono);
    background: #f5f5f5;
    color: #333;
}

.encryption-modal-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.encryption-modal-btn {
    width: 100%;
    padding: 14px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.encryption-modal-btn:hover {
    background: var(--color-primary-dark);
}

.encryption-modal-btn-success {
    background: #4CAF50;
}

.encryption-modal-btn-success:hover {
    background: #45a049;
}

/* ==================== URL結果メッセージ ==================== */
.url-msg-success {
    color: #4CAF50;
}

.url-msg-warning {
    color: var(--color-warning);
}

/* ==================== 追加クラス（notifications.php用） ==================== */
.sound-select-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.chat-sound-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 4px 0 8px 0;
    line-height: 1.5;
}

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

/* ==================== レスポンシブ ==================== */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    h1 {
        font-size: 28px;
    }

    .step {
        padding: 20px;
    }

    .step h2 {
        font-size: 22px;
    }

    .btn {
        padding: 14px 24px;
        font-size: 14px;
    }

    .option-group {
        grid-template-columns: 1fr;
    }

    .footer-nav {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .update-notification {
        flex-direction: column;
        align-items: flex-start;
    }

    .update-notification-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ==================== ページヘッダー ==================== */
.auth-user-display {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    border: 1px solid rgba(145, 70, 255, 0.3);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.auth-user-icon {
    width: 18px;
    height: 18px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 12px;
    background: linear-gradient(45deg, #9146ff, #00ff88);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.page-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* ==================== ロードセクション（VC auth用） ==================== */
.load-section {
    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;
}

.load-section-title {
    margin-top: 0;
    color: var(--color-primary);
    font-size: 22px;
}

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

.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;
}

.load-result {
    margin-top: 16px;
}

.or-divider {
    text-align: center;
    margin: 30px 0;
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 600;
}

.btn-lg {
    padding: 20px 40px;
    line-height: 1.6;
}

.btn-info-gradient {
    background: linear-gradient(45deg, var(--color-info), #138496);
}

.btn-success-gradient {
    background: linear-gradient(45deg, #28a745, #20c997);
}

.auth-status {
    margin: 20px 0;
}

/* info-box内のタイトル色 */
.info-box-title-success {
    margin-top: 0;
    color: var(--color-secondary);
}

.info-box-title-warning {
    margin-top: 0;
    color: var(--color-warning);
}

.info-box-title-primary {
    margin-top: 0;
    color: var(--color-primary);
}

/* ==================== ラジオボタングループ（VC customize用） ==================== */
.section-title-primary {
    color: var(--color-primary);
}

.radio-group {
    margin: 10px 0;
}

.radio-label {
    display: block;
    margin: 5px 0;
    cursor: pointer;
}

/* プレビューアイコン */
.preview-icon-vc {
    width: 20px;
    height: 20px;
    fill: #ffffff;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.8));
}

.preview-text-vc {
    font-family: 'Fira Sans', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

/* ==================== VC generate用 ==================== */
/* info-boxバリエーション */
.info-box-success {
    background: rgba(40, 167, 69, 0.1);
    border-color: #28a745;
}

.info-box-primary {
    background: rgba(145, 70, 255, 0.1);
    border-color: #9146ff;
}

/* URL結果表示 */
.url-result {
    margin: 20px auto;
}

.url-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.url-input-readonly {
    flex: 1;
    font-family: monospace;
    font-size: 14px;
}

.btn-copy {
    margin: 0;
    padding: 12px 20px;
}

.copy-success {
    margin-top: 12px;
    color: var(--color-secondary);
    font-size: 14px;
}

.url-reload-message {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* 再認証メッセージ */
.reauth-message {
    margin-top: 20px;
    padding: 16px;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    color: var(--color-warning);
    font-size: 14px;
    text-align: center;
}

/* OBSガイドボックス */
.obs-guide-box {
    margin-top: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* バージョン表示 */
.version-display {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 12px;
}

/* ==================== タブナビゲーション ==================== */
.tab-nav {
    display: flex;
    gap: 4px;
    margin-bottom: 0;
    padding: 0 8px;
    position: relative;
    overflow: hidden;
    padding-bottom: 0;
}

.tab-btn {
    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: 1px;
}

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

.tab-btn.tab-btn-pulse {
    animation: tab-pulse 1.5s ease-in-out infinite;
    color: #ff9800;
}
@keyframes tab-pulse {
    0%, 100% { background: rgba(40, 40, 60, 0.6); }
    50% { background: rgba(255, 152, 0, 0.15); border-color: rgba(255, 152, 0, 0.5); }
}

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

.tab-content {
    display: none;
    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;
}

.tab-content.active {
    display: block;
}
