/* ============================================================
   使用回饋頁面專用樣式表 (Feedback Page Stylesheet)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700;900&display=swap');

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

:root {
    --green-primary: #00c35e;
    --green-dark: #009e4c;
    --green-deeper: #007a3d;
    --green-light: #7cd45e;
    --black: #111111;
    --white: #ffffff;
    --gray-bg: #f7faf8;
    --gray-text: #4a5568;
    --gray-light: #edf2f7;
    --gray-border: #e2e8f0;
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 16px 36px rgba(0, 0, 0, 0.10);
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition: all 0.25s ease;
}

body {
    background-color: var(--gray-bg);
    color: var(--black);
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow-y: auto !important;
}

/* 頂部導覽列 */
.feedback-nav {
    height: 64px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 36px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.feedback-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--black);
    font-weight: 800;
    font-size: 16px;
}

.feedback-logo-badge {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green-primary);
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid var(--gray-border);
    background: var(--white);
    color: var(--black);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-back-home:hover {
    border-color: var(--green-primary);
    color: var(--green-deeper);
    background: #fafdfa;
    transform: translateY(-1px);
}

/* 容器與卡片 */
.feedback-container {
    width: 100%;
    max-width: 660px;
    margin: 40px auto 60px;
    padding: 0 20px;
}

.feedback-card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-border);
    box-shadow: var(--shadow-card);
    padding: 36px 32px;
}

.feedback-header {
    text-align: center;
    margin-bottom: 28px;
}

.feedback-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0, 195, 94, 0.1);
    color: var(--green-deeper);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 8px;
}

.feedback-title {
    font-size: 26px;
    font-weight: 900;
    color: var(--black);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.feedback-subtitle {
    font-size: 13.5px;
    color: var(--gray-text);
    line-height: 1.6;
}

/* Tab 切換分頁按鈕 */
.tab-switcher {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--gray-light);
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 24px;
    gap: 4px;
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-text);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.tab-btn.active {
    background: var(--white);
    color: var(--green-deeper);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* 星星打分元件 */
.rating-group {
    margin-bottom: 20px;
    text-align: center;
    padding: 16px;
    background: #fafdfb;
    border: 1px dashed var(--gray-border);
    border-radius: 8px;
}

.rating-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 8px;
    display: block;
}

.stars-container {
    display: inline-flex;
    flex-direction: row-reverse;
    justify-content: center;
    gap: 6px;
}

.stars-container input[type="radio"] {
    display: none;
}

.stars-container label {
    font-size: 32px;
    color: #d1d5db;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
    user-select: none;
}

.stars-container label:hover,
.stars-container label:hover ~ label,
.stars-container input[type="radio"]:checked ~ label {
    color: #f59e0b;
    transform: scale(1.1);
}

.rating-hint {
    font-size: 12px;
    color: var(--gray-text);
    margin-top: 6px;
    min-height: 18px;
    font-weight: 500;
}

/* 表單元件 */
.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 5px;
    line-height: 1.4;
}

.form-input {
    padding: 9px 12px;
    border: 1.5px solid var(--gray-border);
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: var(--black);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(0, 195, 94, 0.12);
}

.feedback-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-border);
    border-radius: 8px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--black);
    resize: vertical;
    outline: none;
    transition: var(--transition);
    line-height: 1.6;
}

.feedback-textarea:focus {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(0, 195, 94, 0.12);
}

.feedback-submit-btn {
    width: 100%;
    margin-top: 18px;
    padding: 13px;
    background: var(--green-primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    letter-spacing: 0.5px;
}

.feedback-submit-btn:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 195, 94, 0.35);
}

.feedback-form-panel {
    display: none;
}

.feedback-form-panel.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 成功畫面 */
.success-view {
    display: none;
    text-align: center;
    padding: 30px 10px;
}

.success-view.active {
    display: block;
}

.success-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.success-title {
    font-size: 20px;
    font-weight: 900;
    color: var(--black);
    margin-bottom: 8px;
}

.success-desc {
    font-size: 13.5px;
    color: var(--gray-text);
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto 24px;
}

.success-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* 頁尾 */
.footer-compact {
    width: 100%;
    padding: 14px 30px;
    background: #0f1f14;
    color: rgba(255, 255, 255, 0.65);
    font-size: 11.5px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    flex-shrink: 0;
    gap: 16px;
}

.footer-text-left {
    font-weight: 500;
    justify-self: start;
    text-align: left;
}

.footer-nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-self: center;
    text-align: center;
}

.footer-nav-links a {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
}

.footer-nav-links a:hover {
    color: var(--green-primary);
    text-decoration: underline;
}

.footer-text-right {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-self: end;
    text-align: right;
}

.footer-text-right a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.footer-text-right a:hover {
    color: var(--green-primary);
}

/* 響應式 */
@media (max-width: 768px) {
    .feedback-nav {
        padding: 0 18px;
        height: 56px;
    }

    .feedback-card {
        padding: 24px 18px;
    }

    .feedback-title {
        font-size: 22px;
    }

    .footer-compact {
        display: flex;
        flex-direction: column;
        gap: 14px;
        text-align: center;
        padding: 22px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .footer-nav-links {
        gap: 12px 18px;
    }

    .footer-text-left,
    .footer-nav-links,
    .footer-text-right {
        justify-self: auto;
    }
}
