/* 基礎樣式 */
body { font-family: "Microsoft JhengHei", Arial, sans-serif; background-color: #f0f2f5; margin: 0; }

/* 導覽列核心排版 */
.navbar {
    display: flex;
    justify-content: space-between; /* 讓 left 和 right 撐到最兩端 */
    align-items: center;
    padding: 0 30px;
    background: #007bff;
    color: white;
    height: 65px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 左側標題區 */
.nav-left { display: flex; align-items: center; }
.logo-link { text-decoration: none; color: white; }
.logo { font-size: 1.4rem; font-weight: bold; }
.logo small { font-size: 0.9rem; font-weight: normal; opacity: 0.8; margin-left: 5px; }

/* 右側選單區 */
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-link { color: white; text-decoration: none; font-weight: bold; }
.user-info { font-size: 0.9rem; color: #eefbff; }

/* 下拉選單樣式 */
.dropdown { position: relative; display: inline-block; }
.dropbtn { background-color: #0056b3; color: white; padding: 8px 16px; border: none; cursor: pointer; border-radius: 4px; }
.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
}
.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a { color: #333 !important; padding: 12px 16px; text-decoration: none; display: block; border-bottom: 1px solid #eee; }
.dropdown-content a:hover { background-color: #f1f1f1; }

/* 按鈕美化 */
.btn-nav-login { background: #28a745; color: white; border: none; padding: 8px 15px; border-radius: 4px; cursor: pointer; }
.btn-nav-reg { background: #17a2b8; color: white; text-decoration: none; padding: 8px 15px; border-radius: 4px; margin-left: 5px; }
.btn-reg-link { background-color: #007bff; color: white; text-decoration: none; padding: 10px 20px; border-radius: 5px; font-weight: bold; transition: background 0.3s;}
.btn-reg-link:hover { background-color: #0056b3;}
.btn-submit { width: 100%; padding: 12px; background: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 1rem; }
.logout-btn { background: #dc3545; color: white; text-decoration: none; padding: 6px 12px; border-radius: 4px; font-size: 0.85rem; }

/* 內容容器 */
.container { width: 95%; max-width: 1100px; margin: 30px auto; padding: 25px; background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.news-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.news-table th { background: #007bff; color: white; padding: 12px; text-align: left; }
.news-table td { border: 1px solid #eee; padding: 12px; }
.hidden { display: none !important; }

.reg-container { max-width: 600px; margin: 40px auto; background: white; padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.form-row { display: flex; gap: 20px; margin-bottom: 15px; }
.form-group { flex: 1; display: flex; flex-direction: column; }
.form-group label { margin-bottom: 5px; font-weight: bold; }
.form-group input, .form-group select { padding: 10px; border: 1px solid #ccc; border-radius: 4px; }
.required::after { content: " *"; color: red; }
