/* 柔道教室月間予定表 - スタイルシート */

/* 同期バッジスタイル */
.sync-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.sync-btn {
    position: relative;
}

/* カスタムプロパティ（CSS変数） */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --practice-color: #5dade2;
    --special-color: #9b59b6;  /* 紫色に変更（赤は中学生バッジと被るため） */
    --tournament-color: #f39c12;
    --closed-color: #95a5a6;
    --text-color: #333;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #ddd;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --hover-shadow: 0 4px 8px rgba(0,0,0,0.15);
    --success-color: #2ecc71;
    --warning-color: #e67e22;
    --info-color: #3498db;
}

/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基本スタイル */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ヘッダー */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow);
}

h1 {
    text-align: center;
    font-size: 24px;
    font-weight: 500;
}

/* カレンダーコントロール */
.calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.grade-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.grade-filter label {
    font-weight: 500;
    color: var(--text-color);
}

.grade-filter select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background-color: var(--card-bg);
}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
}

.month-navigation button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.month-navigation button:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.month-navigation button:active {
    transform: translateY(0);
}

.current-month {
    font-size: 20px;
    font-weight: 500;
}

/* アクションボタン */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-buttons button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-block;
}

/* 一般ユーザーの場合のみ非表示 */
.general-user-hide {
    display: none !important;
}

.action-buttons button:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

/* 凡例 */
.legend {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.legend-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.legend-section h4 {
    margin: 0;
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 500;
}

.legend-items {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

/* 学年バッジ */
.grade-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 11px;
    font-weight: bold;
    color: white;
    margin-left: 4px;
}

.grade-badge.all {
    background-color: #7f8c8d;
}

.grade-badge.elementary {
    background-color: #3498db;
}

.grade-badge.junior {
    background-color: #e74c3c;
}

/* イベント内の学年バッジ */
.event .grade-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 10px;
    z-index: 1;
    font-weight: bold;
}

/* 特別予定一覧の学年バッジ */
.special-event-header .grade-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    width: auto;
    height: auto;
    line-height: normal;
}

/* カレンダー */
.calendar {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--border-color);
    padding: 1px;
}

.calendar-header {
    background-color: var(--primary-color);
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
}

.calendar-day {
    min-height: 120px;
    padding: 10px;
    border: 1px solid var(--border-color);
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    background-color: white;
}

.calendar-day:hover {
    background-color: #f8f9fa;
}

.calendar-day.other-month {
    background-color: #fafafa;
    color: #999;
    opacity: 0.7;
}

.day-number {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 16px;
    color: var(--primary-color);
}

/* イベント */
.event {
    font-size: 13px;
    padding: 4px 8px;
    margin: 4px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    max-width: 100%;
    display: block;
    line-height: 1.4;
    font-weight: 500;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    min-height: 28px;
}

.event-title {
    display: inline-block;
    max-width: calc(100% - 30px);
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

/* 画面幅に応じてフォントサイズ調整 */
@media (min-width: 768px) {
    .event {
        font-size: 14px;
        padding: 5px 10px;
    }
}

/* 長い予定名のツールチップ */
.event:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 0;
    background-color: #333;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    animation: fadeIn 0.2s forwards;
    animation-delay: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.event:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.event.practice {
    background-color: var(--practice-color);
    color: white;
    border-left: 4px solid #2980b9;
}

.event.special {
    background-color: var(--special-color);
    color: white;
    border-left: 4px solid #8e44ad;
}

.event.tournament {
    background-color: var(--tournament-color);
    color: white;
    border-left: 4px solid #d68910;
}

.event.closed {
    background-color: var(--closed-color);
    color: white;
    border-left: 4px solid #7f8c8d;
}

.event .participant-count {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    background-color: rgba(255, 255, 255, 0.4);
    padding: 1px 5px;
    border-radius: 10px;
    font-weight: bold;
}

/* 編集モードトグル */
.edit-mode-toggle {
    position: fixed;
    top: 80px;  /* ヘッダーの下に配置 */
    left: 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: var(--hover-shadow);
    z-index: 1000;
    transition: all 0.3s;
    font-size: 14px;
}

.edit-mode-toggle:hover {
    background-color: #34495e;
    transform: translateX(2px);
}

/* FAB（フローティングアクションボタン） */
.add-event-fab {
    position: fixed;
    top: 80px;  /* ヘッダーの下に配置 */
    right: 20px;
    width: 48px;
    height: 48px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--hover-shadow);
    font-size: 22px;
    display: none;
    z-index: 1000;
    transition: all 0.3s;
}

.add-event-fab:hover {
    background-color: #2980b9;
    transform: rotate(90deg) scale(1.1);
}

.edit-mode .add-event-fab {
    display: block;
}

/* 管理パネル */
.admin-panel {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    display: none;
}

.edit-mode .admin-panel {
    display: block;
}

/* 折りたたみ可能なヘッダー */
.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    margin: -10px -10px 10px -10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.admin-panel-header:hover {
    background-color: #f0f0f0;
}

.admin-panel-header h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.collapse-icon {
    transition: transform 0.3s;
    font-size: 16px;
}

.admin-panel.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.admin-panel.collapsed .event-list {
    display: none;
}

.event-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.event-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.event-item:hover {
    background-color: #f8f9fa;
}

.event-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* コピーボタンのスタイル */
.btn-copy {
    background-color: #95a5a6;
    color: white;
}

.btn-copy:hover {
    background-color: #7f8c8d;
}

/* ファイル添付関連 */
.attachment-section {
    margin-top: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.attachment-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    margin: 5px 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.attachment-item a {
    color: var(--secondary-color);
    text-decoration: none;
    flex: 1;
}

.attachment-item a:hover {
    text-decoration: underline;
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-input-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.file-input-label:hover {
    background-color: #2980b9;
}

/* ボタン */
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #27ae60;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

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

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

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.modal-content.large {
    max-width: 800px;
}

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

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

.modal-title {
    font-size: 24px;
    font-weight: 500;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #333;
}

/* フォーム */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* フッター */
.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

/* 通知 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #2ecc71;
    color: white;
    padding: 15px 20px;
    border-radius: 4px;
    box-shadow: var(--hover-shadow);
    z-index: 2000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* 生徒リスト */
.student-list {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.student-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px;
    border-bottom: 1px solid #eee;
}

.student-item:last-child {
    border-bottom: none;
}

/* 参加者リスト */
.participant-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
}

.participant-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.participant-item:last-child {
    border-bottom: none;
}

.participant-status {
    display: flex;
    gap: 10px;
    align-items: center;
}

.participant-status label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.participant-note {
    flex: 1;
    margin-left: 10px;
}

.participant-note input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    font-size: 14px;
}

/* 集計セクション */
.summary-section {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-top: 20px;
}

.summary-section h4 {
    margin-bottom: 10px;
}

/* エラースタイル */
.error {
    border-color: #e74c3c !important;
}

.error-message {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

/* ログイン画面 */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-container {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
}

.login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-error {
    background-color: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

/* ユーザー情報表示 */
.user-info {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--card-bg);
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info .user-type {
    font-weight: bold;
    color: var(--primary-color);
}

.user-info .logout-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.user-info .logout-btn:hover {
    background-color: #2980b9;
}

/* 参加確認ボタン */
.event .participate-btn {
    background-color: var(--info-color);
    color: white;
    padding: 2px 6px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
    margin: 0;
    transition: all 0.2s;
    position: absolute;
    bottom: 2px;
    right: 2px;
    display: none;
}

.event:hover .participate-btn {
    display: block;
}

.participate-btn:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

/* 参加状況バッジ */
.participation-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

.participation-badge.attending {
    background-color: var(--success-color);
    color: white;
}

.participation-badge.not-attending {
    background-color: var(--warning-color);
    color: white;
}

.participation-badge.pending {
    background-color: var(--closed-color);
    color: white;
}

/* 簡易参加確認モーダル */
.quick-participate-modal .modal-content {
    max-width: 400px;
}

.participation-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.participation-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.participation-option:hover {
    border-color: var(--secondary-color);
    background-color: #f8f9fa;
}

.participation-option.selected {
    border-color: var(--secondary-color);
    background-color: #e3f2fd;
}

.participation-option input[type="radio"] {
    margin-right: 10px;
}

.participation-option label {
    flex: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.participation-icon {
    font-size: 20px;
}

/* 一般ユーザー用の非表示要素 */
body:not(.admin-mode) .general-user-hide {
    display: none !important;
}

/* 管理者モードでの表示 */
body.admin-mode .general-user-hide {
    display: block !important;
}

body.admin-mode .action-buttons {
    display: flex !important;
}

body.admin-mode .edit-mode-toggle {
    display: block !important;
}

body.admin-mode .add-event-fab {
    display: block !important;
}

/* 特別予定一覧 */
.special-events-section {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.special-events-section h2 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 20px;
}

.special-events-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.special-event-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s;
    background-color: #fafafa;
}

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

.special-event-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.event-type-badge {
    padding: 4px 12px;
    border-radius: 15px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.event-type-badge.special {
    background-color: var(--special-color);
}

.event-type-badge.tournament {
    background-color: var(--tournament-color);
}

.event-type-badge.closed {
    background-color: var(--closed-color);
}

.event-date {
    font-weight: bold;
    color: var(--primary-color);
}

.participant-count-badge {
    background-color: var(--info-color);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
}

.special-event-content h4 {
    margin: 0 0 10px 0;
    color: var(--text-color);
}

.event-time, .event-location {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.event-description {
    margin: 10px 0;
    color: var(--text-color);
    line-height: 1.5;
}

.special-event-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.detail-btn, .participate-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.detail-btn {
    background-color: var(--secondary-color);
    color: white;
}

.detail-btn:hover {
    background-color: #2980b9;
}

.participate-btn {
    background-color: var(--success-color);
    color: white;
}

.participate-btn:hover {
    background-color: #27ae60;
}

/* 参加者詳細表示 */
.participant-details {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.participant-details h4 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
}

.status-group {
    margin-bottom: 15px;
}

.status-group:last-child {
    margin-bottom: 0;
}

.status-group strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
}

.participant-list-detail {
    list-style: none;
    padding: 0;
    margin: 0;
}

.participant-list-detail li {
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
    color: var(--text-color);
}

.participant-list-detail li:last-child {
    border-bottom: none;
}

.participant-note-text {
    color: #666;
    font-style: italic;
    font-size: 14px;
}

/* 生徒管理の改善 */
.student-management {
    display: grid;
    gap: 20px;
}

.student-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.student-group {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.student-group h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.student-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background-color: white;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card h5 {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.stat-card .number {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 5px 0;
}

.student-attendance {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

.attendance-rate {
    font-weight: bold;
    color: var(--success-color);
}

/* 印刷用スタイル */
@media print {
    body {
        background-color: white;
    }

    .container {
        max-width: 100%;
        padding: 10px;
    }

    header {
        background-color: white;
        color: black;
        border-bottom: 2px solid #333;
    }

    .calendar-controls,
    .edit-mode-toggle,
    .add-event-fab,
    .admin-panel,
    .action-buttons,
    .event-actions {
        display: none !important;
    }

    .calendar {
        box-shadow: none;
        border: 1px solid #333;
    }

    .calendar-header {
        background-color: #f0f0f0;
        color: black;
        font-weight: bold;
    }

    .calendar-day {
        min-height: 80px;
    }

    .event {
        font-size: 10px;
        padding: 1px 3px;
    }

    .footer {
        display: none;
    }
}

/* レスポンシブデザイン（タブレット） */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 20px;
    }

    .calendar-controls {
        justify-content: center;
    }

    .month-navigation {
        order: -1;
        width: 100%;
        justify-content: center;
    }

    .action-buttons {
        width: 100%;
        justify-content: center;
    }

    .legend {
        justify-content: center;
    }

    .calendar-day {
        min-height: 100px;
        padding: 6px;
    }

    .event {
        font-size: 12px;
        padding: 3px 6px;
        margin: 3px 0;
    }

    .modal-content {
        padding: 20px;
    }

    .edit-mode-toggle {
        top: 70px;  /* モバイルでは少し上に */
        left: 10px;
        padding: 8px 16px;
        font-size: 13px;
    }

    .add-event-fab {
        top: 70px;  /* モバイルでは少し上に */
        right: 10px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .special-events-section {
        padding: 15px;
        margin: 15px 0;
    }

    .special-event-item {
        padding: 12px;
    }

    .special-event-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .special-event-actions {
        flex-direction: column;
    }

    .detail-btn, .participate-btn {
        width: 100%;
        text-align: center;
    }
}

/* レスポンシブデザイン（スマートフォン） */
@media (max-width: 480px) {
    .month-navigation button {
        padding: 8px 16px;
        font-size: 14px;
    }

    .current-month {
        font-size: 18px;
    }

    .calendar-header {
        font-size: 14px;
        padding: 8px 4px;
    }

    .day-number {
        font-size: 14px;
    }
    
    .event {
        font-size: 11px;
        padding: 2px 5px;
        margin: 2px 0;
        min-height: 24px;
    }
    
    .calendar-day {
        min-height: 85px;
        padding: 4px;
    }
}

/* Footer Styles - Enhanced */
.footer {
    background: transparent;
    color: #777;
    padding: 30px 0;
    text-align: center;
    position: relative;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#lastUpdated {
    margin: 0 0 20px 0;
    font-size: 0.85rem;
    color: #808080;
    font-weight: 300;
}

.developer-credit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.credit-main {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 1.3rem;
    padding: 15px 25px;
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.08), rgba(212, 175, 55, 0.05));
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(74, 144, 226, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.credit-main:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 48px rgba(74, 144, 226, 0.15);
    background: linear-gradient(135deg, rgba(74, 144, 226, 0.12), rgba(212, 175, 55, 0.08));
}

.copyright {
    color: #555;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.developer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #4a90e2;
    text-decoration: none;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 12px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.4));
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.1);
}

.developer-link:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6));
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 32px rgba(74, 144, 226, 0.2);
}

.company-name {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.8px;
    color: #4a90e2;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(74, 144, 226, 0.1);
    background: linear-gradient(135deg, #4a90e2, #357abd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.separator {
    color: #666;
    font-weight: 300;
    font-size: 1.3rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.company-tagline {
    font-weight: 500;
    font-size: 1.2rem;
    color: #7ba7d9;
    font-style: italic;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(123, 167, 217, 0.2);
    background: linear-gradient(135deg, #7ba7d9, #5c8ec4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.developer-link:hover .company-name {
    background: linear-gradient(135deg, #357abd, #2c5aa0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.05);
}

.developer-link:hover .company-tagline {
    background: linear-gradient(135deg, #5c8ec4, #4a7db0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.03);
}

/* プレミアムアンダーライン効果 */
.developer-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #4a90e2, #d4af37, #4a90e2, transparent);
    transform: translateX(-50%);
    transition: width 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

.developer-link:hover::after {
    width: 100%;
    box-shadow: 0 3px 12px rgba(74, 144, 226, 0.5);
}

/* レスポンシブ対応 */
@media (max-width: 600px) {
    .credit-main {
        flex-direction: column;
        gap: 12px;
        padding: 12px 20px;
        font-size: 1.1rem;
    }
    
    .developer-link {
        flex-direction: column;
        gap: 8px;
        padding: 12px 18px;
    }
    
    .separator {
        display: none;
    }
    
    .copyright {
        font-size: 1rem;
    }
    
    .company-name {
        font-size: 1.2rem;
        letter-spacing: 0.5px;
    }
    
    .company-tagline {
        font-size: 1rem;
    }
}

/* さらに洗練されたアニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer {
    animation: fadeInUp 0.6s ease-out;
}

/* ダークテーマ対応 */
@media (prefers-color-scheme: dark) {
    .footer {
        background: transparent;
    }
    
    .developer-link {
        background: rgba(91, 163, 245, 0.08);
    }
    
    .developer-link:hover {
        background: rgba(91, 163, 245, 0.15);
    }
}
}