:root {
    --bg-gradient: linear-gradient(135deg, #e0f7fa 0%, #f0f4c3 100%);
    --panel-bg: rgba(255, 255, 255, 0.7);
    --text-color: #333333;
    --primary-color: #4dd0e1;
    --primary-hover: #26c6da;
    --success-color: #aed581;
    --success-hover: #8bc34a;
    --x-color: #000000;
    --x-hover: #333333;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --border-radius: 24px;
}

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

body {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.app-container {
    display: flex;
    gap: 2rem;
    width: 100%;
    max-width: 1600px;
    height: 90vh;
    max-height: 900px;
}

.preview-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* センター左寄りにするための設定 */
    padding-right: 2rem;
}

.app-title {
    font-size: 2.5rem;
    color: #00838f;
    margin-bottom: 2rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
}

.canvas-wrapper {
    width: 100%;
    max-width: 1100px;
    aspect-ratio: 16 / 9;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid #ffffff;
}

/* 実際のCanvasは1920x1080だが、ラッパーに合わせて縮小表示する */
canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: transparent;
}

.control-panel {
    width: 500px;
    background: var(--panel-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
}

.panel-header h2 {
    font-size: 1.5rem;
    color: #006064;
    margin-bottom: 0.5rem;
}

.panel-header p {
    font-size: 0.9rem;
    color: #555;
}

.control-group {
    background: rgba(255, 255, 255, 0.5);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px dashed #4dd0e1;
}

.control-group h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #00838f;
}

.actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn {
    display: block;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: inherit;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

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

.btn.success {
    background-color: var(--success-color);
    color: #33691e;
}
.btn.success:hover {
    background-color: var(--success-hover);
    color: white;
}

.btn.x-btn {
    background-color: var(--x-color);
}
.btn.x-btn:hover {
    background-color: var(--x-hover);
}

/* トグルスイッチのスタイル */
.toggle-switch {
    display: flex;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.toggle-switch input[type="radio"] {
    display: none;
}

.toggle-switch label {
    flex: 1;
    text-align: center;
    padding: 0.8rem;
    cursor: pointer;
    font-weight: bold;
    color: #555;
    transition: all 0.3s;
}

.toggle-switch input[type="radio"]:checked + label {
    background: var(--primary-color);
    color: white;
}

/* ファイルアップロードボタンスタイル */
.file-upload-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn.secondary {
    background-color: #ffb74d;
    color: white;
    text-align: center;
    cursor: pointer;
}

.btn.secondary:hover {
    background-color: #ffa726;
}

.btn.disabled {
    background-color: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.7;
    pointer-events: none;
}

/* 入力フォームのスタイル */
.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #4dd0e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

/* スケジュール入力行 */
.schedule-row {
    background: #fdfdfd;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.schedule-row-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.schedule-date {
    font-weight: bold;
    color: #00796b;
    min-width: 60px;
}

.schedule-time {
    width: 90px;
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.schedule-game, .schedule-title {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.schedule-rest {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #ff5252;
    margin-left: auto;
}

.schedule-row.is-rest {
    opacity: 0.6;
    background: #ffebee;
}
