/* セリフメンテナンス - メインスタイル */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
    margin: 0;
    padding: 0;
}

.container {
    width: 100%;
    padding: 0;
    margin: 0;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.back-button {
    position: absolute;
    left: 0;
    top: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1em;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.back-button:active {
    transform: scale(0.95);
}

.header p {
    font-size: 1.1em;
    opacity: 0.9;
}

/* ステータスパネル */
.status-panel {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* APIステータスパネル */
.api-status-panel {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 15px 20px;
    margin: 10px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.api-status-title {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 10px;
    text-align: center;
}

.api-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.api-status-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.api-status-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 0 8px currentColor;
    animation: statusPulse 2s infinite;
}

.api-status-light.active {
    background: #4CAF50;
    color: #4CAF50;
    box-shadow: 0 0 12px #4CAF50;
}

.api-status-light.inactive {
    background: #FFC107;
    color: #FFC107;
    box-shadow: 0 0 8px #FFC107;
}

.api-status-light.missing {
    background: #9E9E9E;
    color: #9E9E9E;
    box-shadow: 0 0 6px #9E9E9E;
}

.api-status-light.invalid {
    background: #F44336;
    color: #F44336;
    box-shadow: 0 0 10px #F44336;
}

.api-status-light.error {
    background: #FF5722;
    color: #FF5722;
    box-shadow: 0 0 8px #FF5722;
    animation: errorBlink 1s infinite;
}

.api-status-label {
    font-size: 12px;
    font-weight: 600;
    color: #ffffff;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes errorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-label {
    font-weight: 600;
    color: #ffffff;
}

.status-value {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
}

.status-value.success {
    background: rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.status-value.error {
    background: rgba(244, 67, 54, 0.3);
    color: #f44336;
}

.status-value.warning {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

/* 一括操作ボタン */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    min-width: 180px;
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(145deg, #764ba2, #667eea);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.action-btn.processing {
    background: linear-gradient(145deg, #ff9800, #f57c00);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 通知システム */
.notification-container, #notifications {
    position: fixed !important;
    top: 80px !important; /* ヘッダーの下に表示 */
    right: 20px !important;
    z-index: 99999 !important; /* 最高レベルのz-index */
    max-width: 400px !important;
    pointer-events: auto !important;
}

.notification {
    position: relative !important;
    background: rgba(255, 255, 255, 0.98) !important;
    color: #333 !important;
    padding: 15px 20px !important;
    margin-bottom: 10px !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(15px) !important;
    border-left: 4px solid #667eea !important;
    animation: slideIn 0.3s ease-out !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-weight: 500 !important;
    z-index: 100001 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    min-width: 300px !important;
    max-width: 450px !important;
    transform: translateZ(0) !important; /* GPU加速で最前面に */
}

.notification.success {
    border-left-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    color: #2e7d32;
}

.notification.error {
    border-left-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    color: #c62828;
}

.notification.warning {
    border-left-color: #ff9800;
    background: rgba(255, 152, 0, 0.1);
    color: #f57c00;
}

.notification.info {
    border-left-color: #2196f3;
    background: rgba(33, 150, 243, 0.1);
    color: #1565c0;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* メインコンテンツレイアウト（共通レイアウト未使用時） */
body:not(.common-layout-body) .main-content {
    display: block;
    width: 100%;
    padding: 0 20px;
    height: calc(100vh - 300px);
}

/* 共通レイアウト使用時は共通CSSに委譲 */
.common-layout-body .main-content {
    height: auto; /* 高さ制限を解除 */
    padding: 0px 20px 20px 20px; /* 上部余白を0pxに削減 */
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    width: 100%;
}

/* 右側サイドバーのスタイル */
.status-sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border-radius: 20px !important;
    padding: 25px !important;
    height: auto !important;
    overflow: visible !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    width: 300px !important;
    min-width: 300px !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* 右サイドバー内のカード共通スタイル */
.status-sidebar .status-card,
.status-sidebar .api-status-card,
.status-sidebar .action-card,
.status-sidebar .script-management-card {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 15px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}

.status-sidebar h3 {
    color: white;
    font-size: 16px;
    margin: 0 0 15px 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* システム状態パネル */
.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 10px;
}

.status-item {
    text-align: center;
}

.status-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 500;
}

.status-badge {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-badge.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border-color: rgba(76, 175, 80, 0.3);
}

.status-number {
    color: white;
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
}

/* API接続状態パネル */
.api-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.api-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.api-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.api-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.api-label {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.api-status-indicator {
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.api-status-indicator.online {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.api-status-indicator.offline {
    background: rgba(156, 156, 156, 0.2);
    color: #9c9c9c;
    border: 1px solid rgba(156, 156, 156, 0.3);
}

/* 一括操作パネル */
.action-button {
    margin-bottom: 12px;
}

.action-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn.check {
    background: rgba(156, 156, 156, 0.2);
    color: white;
    border: 1px solid rgba(156, 156, 156, 0.3);
}

.action-btn.generate {
    background: rgba(96, 125, 139, 0.2);
    color: white;
    border: 1px solid rgba(96, 125, 139, 0.3);
}

.action-btn.regenerate {
    background: rgba(103, 58, 183, 0.8);
    color: white;
    border: 1px solid rgba(103, 58, 183, 1);
}

.action-btn.add {
    background: linear-gradient(135deg, #00bcd4, #2196f3);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* セリフ管理パネル */
.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.filter-row label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
}

.sidebar-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    color: white;
    font-size: 14px;
    min-width: 120px;
}

.sidebar-select option {
    background: #333;
    color: white;
}

/* サイドバー内の全ての要素に水平表示を強制（穏やかなアプローチ） */
.status-sidebar {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
}

/* API状態要素のみ特定修正 */
.api-status,
.api-status-light,
.api-status-label,
#openai-status,
#gemini-status,
#voicevox-api-status {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    display: inline !important;
    white-space: nowrap !important;
    transform: none !important;
}

/* エラー修正ボタン */
.btn-fix {
    background: #FF9800;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-fix:hover {
    background: #F57C00;
}

/* ステータスアクション */
.status-actions {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-info {
    background: #17a2b8;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-info:hover {
    background: #138496;
}

.btn-success {
    background: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-success:hover {
    background: #218838;
}

/* コンパクトパネル共通スタイル */
.compact-status-panel, .compact-api-panel, .compact-buttons, .compact-script-controls {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: auto;
    overflow: visible;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
}

.compact-status-panel h3, .compact-api-panel h3, .compact-buttons h3, .compact-script-controls h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #fff;
    opacity: 0.9;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    white-space: nowrap;
}

/* コンパクトパネル内のコンテンツ */
.status-grid, .stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.status-item, .stat-item {
    text-align: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
}

.status-label, .stat-label {
    font-size: 11px;
    color: #ccc;
    margin-bottom: 5px;
}

.status-value, .stat-value {
    font-size: 13px;
    font-weight: bold;
    color: #fff;
}

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

.api-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
}

.api-item * {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    transform: none !important;
}

.api-label {
    font-size: 12px;
    color: #fff;
}

.api-status {
    font-size: 11px;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.compact-action-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.compact-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.compact-action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.compact-action-btn.success {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.filter-section {
    margin-bottom: 15px;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
}

.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
}

.filter-row label {
    font-size: 12px;
    color: #ccc;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    white-space: nowrap;
}

.filter-row select {
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 11px;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    white-space: nowrap;
}

.filter-row select option {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    direction: ltr !important;
    white-space: nowrap;
}

.compact-add-button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.compact-add-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

/* セリフ編集エリア（70%幅） */
.scripts-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
}

/* セリフコンテナを2列グリッドレイアウトに */
.scripts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.scripts-section::-webkit-scrollbar {
    width: 8px;
}

.scripts-section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.scripts-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.scripts-section::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* スタジオエリア（画像スタジオ用に移動） */
/* .studio-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow-y: auto;
}

.studio-section::-webkit-scrollbar {
    width: 8px;
}

.studio-section::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.studio-section::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.studio-section::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
} */

/* セリフ項目スタイル */
.script-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.script-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

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

.script-id {
    font-size: 14px;
    font-weight: bold;
    color: #4facfe;
}

.audio-status {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.audio-status.generated {
    background: rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.audio-status.pending {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.audio-status.none {
    background: rgba(158, 158, 158, 0.3);
    color: #9e9e9e;
}

/* フォームコントロール */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: white;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    color: #2c3e50;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.2);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* ボタンスタイル */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(145deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(145deg, #764ba2, #667eea);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background: linear-gradient(145deg, #4caf50, #43a047);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(145deg, #43a047, #4caf50);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-warning {
    background: linear-gradient(145deg, #ff9800, #f57c00);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(145deg, #f57c00, #ff9800);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.btn-danger {
    background: linear-gradient(145deg, #f44336, #d32f2f);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(145deg, #d32f2f, #f44336);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.3);
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    min-width: auto;
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.modal-title {
    font-size: 1.5em;
    font-weight: bold;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* レスポンシブ */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 15px;
        height: auto;
    }
    
    .studio-section {
        order: -1;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .back-button {
        position: static;
        display: inline-block;
        margin-bottom: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
    }
}




