* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', Arial, sans-serif;
    background: linear-gradient(135deg, #f0f4f8, #d9e2ec);
    color: #333;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

header {
    background: #2c3e50;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.menu-btn {
    font-size: 32px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px 10px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
}

.login-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-btn:hover {
    background: #2980b9;
}

/* 側邊選單 */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: #34495e;
    transition: left 0.4s ease;
    z-index: 999;
    padding-top: 80px;
}

.sidebar.active {
    left: 0;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    border-bottom: 1px solid #4a6074;
}

.sidebar ul li a {
    display: block;
    padding: 18px 30px;
    color: #ecf0f1;
    text-decoration: none;
    font-size: 18px;
    transition: background 0.3s;
}

.sidebar ul li a:hover {
    background: #3d566e;
}

/* 登入彈窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 420px;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 36px;
    color: #999;
    cursor: pointer;
    font-weight: bold;
}

.close-btn:hover {
    color: #333;
}

.modal-content h2 {
    margin-bottom: 30px;
    font-size: 28px;
    color: #2c3e50;
}

.modal-content input {
    width: 100%;
    padding: 14px 20px;
    margin: 12px 0;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 16px;
}

.login-submit {
    width: 100%;
    padding: 14px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}

.login-submit:hover {
    background: #2980b9;
}

.links {
    margin-top: 25px;
}

.links a {
    color: red;
    text-decoration: none;
    margin: 0 15px;
    font-size: 15px;
}

.links a:hover {
    text-decoration: underline;
}

/* 主內容 */
main {
    padding: 100px 40px 40px;
    text-align: center;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

main h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #2c3e50;
}

main p {
    font-size: 20px;
    color: #555;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .sidebar {
        width: 240px;
        left: -240px;
    }

    main h1 {
        font-size: 36px;
    }

    main p {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 12px 20px;
    }

    .menu-btn {
        font-size: 28px;
    }

    .logo {
        font-size: 20px;
    }

    .login-btn {
        padding: 8px 18px;
        font-size: 14px;
    }

    main {
        padding: 90px 20px 20px;
    }

    main h1 {
        font-size: 30px;
    }
}