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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #4a90e2;
}

header h1 {
    color: #2c3e50;
    font-size: 2em;
}

section {
    margin-bottom: 40px;
}

h2 {
    color: #34495e;
    margin-bottom: 20px;
    font-size: 1.5em;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

/* 表單樣式 */
.form-section {
    background-color: #fafafa;
    padding: 25px;
    border-radius: 6px;
    margin-bottom: 30px;
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
}

textarea {
    resize: vertical;
    min-height: 60px;
}

.btn-primary {
    background-color: #4a90e2;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
    font-weight: 500;
}

.btn-primary:hover {
    background-color: #357abd;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* 表格樣式 */
.records-section {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    margin-top: 10px;
}

thead {
    background-color: #4a90e2;
    color: white;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    font-weight: 600;
    position: sticky;
    top: 0;
}

tbody tr:hover {
    background-color: #f8f9fa;
}

tbody tr:last-child td {
    border-bottom: none;
}

.btn-delete {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

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

.empty-message {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: 1.1em;
}

.empty-message.hidden {
    display: none;
}

/* 響應式設計 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    header h1 {
        font-size: 1.5em;
    }

    h2 {
        font-size: 1.2em;
    }

    .form-section {
        padding: 15px;
    }

    table {
        font-size: 14px;
    }

    th, td {
        padding: 8px 6px;
    }

    /* 在小螢幕上隱藏部分欄位，只顯示重要資訊 */
    .mobile-hide {
        display: none;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.3em;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 6px 4px;
    }
}

