/* ==========================================================================
   1. 共通設定 (Base)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", sans-serif;
    color: #333;
    background-color: #f4f7f9;
    line-height: 1.6;
}

/* ==========================================================================
   2. ログイン画面 (login.html)
   ========================================================================== */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #ffffff;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    padding: 0 5%;
    gap: 50px;
}

.image-box {
    flex: 1;
    display: flex;
    justify-content: center;
    max-width: 600px;
}

.image-box img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.login-box {
    flex: 0 1 400px;
    padding: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.login-box h1 {
    font-size: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-size: 16px;
}

.login-button {
    width: 100%;
    padding: 14px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.login-button:hover {
    background-color: #0055D4;
}

/* ==========================================================================
   3. ホーム共通レイアウト (Sidebar & Header)
   ========================================================================== */
.home-layout {
    display: flex;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    background-color: #2c3e50;
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-logo {
    padding: 25px;
    font-size: 22px;
    font-weight: bold;
    background-color: #1a252f;
    text-align: center;
    letter-spacing: 1px;
}

.sidebar-nav ul {
    list-style: none;
    margin-top: 10px;
}

.sidebar-nav li a {
    display: block;
    padding: 15px 25px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-nav li.active a,
.sidebar-nav li a:hover {
    background-color: #34495e;
    color: #ffffff;
    border-left: 4px solid #3498db;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

.main-header {
    height: 70px;
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    border-bottom: 1px solid #e0e0e0;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logout-link {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

/* ==========================================================================
   4. コンテンツ・カード
   ========================================================================== */
.content-body {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background-color: #f4f7f9;
}

.card {
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.card h2, .card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f4f7f9;
    padding-bottom: 10px;
}

/* グリッドメニュー (画面幅に合わせて列数が変化) */
.grid-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.menu-item {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    padding: 30px 20px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-color: #3498db;
}
/* ==========================================================================
   5. 講義管理専用スタイル (lectures.html)
   ========================================================================= */

/* ステータスカード表示 */
.status-card {
    text-align: center;
    border-top: 5px solid #3498db;
}

#current-period-display {
    font-size: 16px;
    color: #666;
    margin-bottom: 5px;
}

#current-subject-display {
    font-size: 28px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

#countdown-timer {
    font-size: 32px;
    font-weight: bold;
    color: #e74c3c;
    font-family: 'Consolas', 'Monaco', monospace;
}

/* 時間割テーブル */
.timetable-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.timetable-table th, 
.timetable-table td {
    border: 1px solid #eee;
    padding: 15px;
    text-align: center;
}

.timetable-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #555;
}

/* 現在の授業のハイライト (黄色) */
.row-active {
    background-color: #fff9c4 !important;
    font-weight: bold;
    box-shadow: inset 4px 0 0 #f1c40f;
}

/* ==========================================================================
   6. デジタル時計 & その他
   ========================================================================== */
.digital-clock {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: #1a1a1a;
    color: #ffffff; /* マトリックス・グリーン */
    padding: 12px 24px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 28px;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 100;
}

/* ==========================================================================
   7. レスポンシブ
   ========================================================================== */
@media (max-width: 768px) {
    .image-box { display: none; }
    .sidebar { width: 70px; }
    .sidebar-logo, .sidebar-nav span { display: none; }
    .sidebar-nav li a { text-align: center; padding: 20px 0; }
}