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

html, body {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    background-color: #f5f5f5;
}

/* ============================================================
   登入頁面樣式
   ============================================================ */
.login-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./assets/cruise.jpg');
    background-color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* 半透明遮罩 */
.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 1;
}

.login-container {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.03);
    padding: 28px 26px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    max-width: 280px;
    width: 80%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: fadeInUp 0.6s ease-out;
}

.login-container h1 {
    text-align: center;
    font-size: 20px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    margin-bottom: 3px;
}

.tagline {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    margin-bottom: 16px;
}

.error-message {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 5px;
    font-size: 12px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.form-group input {
    padding: 8px 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    transition: border-color 0.3s, background 0.3s;
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.35);
}

.btn-login {
    padding: 9px 16px;
    background: linear-gradient(135deg, #0066cc, #0052a3);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 4px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 102, 204, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.demo-hint {
    text-align: center;
    font-size: 12px;
}

/* ============================================================
   登入後：導覽列
   ============================================================ */
.navbar {
    background: linear-gradient(135deg, #0066cc, #0052a3);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar h1 {
    font-size: 20px;
    font-weight: 600;
}

.username {
    color: #ffeb3b;
    font-weight: 700;
}

.btn-logout {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
    cursor: pointer;
}

.btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   登入後：主容器 + 功能網格
   ============================================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.container h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 30px;
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 30px 25px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #f5f7ff, #f0f4ff);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #0066cc;
}

.feature-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* ============================================================
   動畫
   ============================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   響應式設計
   ============================================================ */
@media (max-width: 768px) {
    .login-container {
        padding: 30px 25px;
        max-width: 100%;
        margin: 20px;
    }

    .login-container h1 {
        font-size: 24px;
    }

    .navbar-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .navbar h1 {
        font-size: 18px;
    }

    .container {
        padding: 25px 15px;
    }

    .container h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 25px 15px;
    }

    .login-container h1 {
        font-size: 22px;
    }

    .tagline {
        font-size: 13px;
    }

    .form-group input {
        font-size: 14px;
        padding: 10px 12px;
    }

    .btn-login {
        padding: 10px 15px;
        font-size: 14px;
    }

    .navbar h1 {
        font-size: 16px;
    }

    .btn-logout {
        padding: 6px 12px;
        font-size: 12px;
    }

    .card-icon {
        font-size: 40px;
    }

    .feature-card h3 {
        font-size: 16px;
    }

    .feature-card p {
        font-size: 13px;
    }
}
