/* iPhone 15 Pro 樣式框架 */
:root {
    --primary-color: #FF7043;
    --primary-light: #FFEBE3;
    --secondary-color: #3DA881;
    --tertiary-color: #F8D34A;
    --background-color: #F2ECE7;
    --text-color: #59483C;
    --gray-light: #F4F4F4;
    --gray-medium: #E0E0E0;
    --neutral-beige: #D2C0B2;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

.phone-frame {
    width: 375px;
    height: 812px;
    margin: 0 auto;
    background-color: var(--neutral-bg);
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: 12px solid #1a1a1a;
    box-sizing: content-box;
}

.phone-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.screen-container {
    margin-bottom: 3rem;
}

/* iOS 狀態欄樣式 */
.ios-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px 0;
    background-color: transparent;
    height: 44px;
}

.status-left {
    font-weight: 600;
    font-size: 14px;
}

.status-right {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.status-battery {
    margin-left: 8px;
}

/* iOS 底部導航欄 */
.ios-tab-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid var(--gray-medium);
    padding-bottom: 20px;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #8E8E93;
    font-size: 10px;
    width: 60px;
}

.tab-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.tab-item.active {
    color: var(--primary-color);
}

/* 共用元素樣式 */
.app-container {
    max-width: 390px;
    height: 844px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background-color: #FFFFFF;
    border-radius: 40px;
    box-shadow: var(--box-shadow);
    /* 隱藏滾動條但保留滾動功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.app-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* 內容區域滾動優化 */
.content-area {
    height: calc(100% - 144px);
    overflow-y: auto;
    padding-bottom: 20px;
    /* 隱藏滾動條但保留滾動功能 */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.content-area::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* 按鈕樣式 */
.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border-radius: 16px;
    padding: 14px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    transition: all 0.2s ease;
    border: none;
}

.primary-btn:hover {
    background-color: #6278C0;
}

.outline-btn {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background-color: transparent;
    border-radius: 16px;
    padding: 14px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    transition: all 0.2s ease;
}

.outline-btn:hover {
    background-color: rgba(115, 137, 211, 0.05);
}

/* 情緒表達相關樣式 */
.mood-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 20px;
}

.mood-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 16px;
}

.mood-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 32px;
    margin-bottom: 8px;
    transition: all 0.2s;
    background-color: var(--tertiary-color);
}

.mood-icon.neutral {
    background-color: var(--tertiary-color);
}

.mood-icon.happy {
    background-color: #A5D6A7;
}

.mood-icon.sad {
    background-color: #FFCC80;
}

.mood-icon.angry {
    background-color: #EF9A9A;
}

.mood-icon.active {
    border: 2px solid var(--primary-color);
}

.mood-label {
    font-size: 14px;
    color: var(--text-color);
}

.mood-meter {
    width: 100%;
    height: 180px;
    background-color: #F8F8F8;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.mood-gauge {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to right, #EF9A9A, #FFCC80, #A5D6A7);
    border-radius: 120px 120px 0 0;
}

.mood-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 110px;
    background-color: #59483C;
    transform-origin: bottom center;
    transform: translateX(-50%);
    z-index: 2;
}

.mood-needle::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: -10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #59483C;
}

.mood-emotions {
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.mood-emotions .emotion {
    font-size: 20px;
    margin-bottom: 10px;
}

/* 卡片樣式 */
.card {
    background-color: white;
    border-radius: 16px;
    box-shadow: var(--box-shadow);
}

/* 表單元素 */
.input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.input-field {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--gray-medium);
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: border 0.2s;
    background-color: var(--gray-light);
}

.input-field:focus {
    border-color: var(--primary-color);
}

.reflection-input {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    background-color: var(--primary-light);
    resize: none;
    min-height: 120px;
}

.mood-question {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 36px;
    color: var(--text-color);
    text-align: center;
}

.mood-description {
    text-align: center;
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 20px;
}

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

/* 頁面標題 */
.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-color);
}

/* 導航欄標題 */
.nav-title {
    height: 60px;
    display: flex;
    align-items: center;
    font-weight: 600;
    background-color: transparent;
    position: relative;
}

.back-button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #DDD;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
}

.page-indicator {
    background-color: rgba(242, 236, 231, 0.7);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    color: var(--text-color);
}

/* 情緒氣泡 */
.emotion-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

/* 統計圖表 */
.stat-bubble {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: rgba(108, 99, 255, 0.2);
    color: var(--text-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

.bubble-calmness {
    background-color: rgba(61, 168, 129, 0.2);
}

.bubble-love {
    background-color: rgba(255, 112, 67, 0.3);
}

.bubble-gratitude {
    background-color: rgba(248, 211, 74, 0.3);
}

/* 小標籤 */
.tag {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

.tag-blue {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.tag-pink {
    background-color: var(--secondary-color);
    color: #C0726D;
}

.tag-green {
    background-color: var(--tertiary-color);
    color: #5B8C6C;
}

/* 進度條容器 */
.progress-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1);
}

.progress-dot.active {
    background-color: var(--primary-color);
}

/* 切換按鈕 */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 32px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* 通知徽章 */
.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background-color: var(--primary-color);
    border-radius: 50%;
    color: white;
    font-size: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 分隔線 */
.divider {
    width: 100%;
    height: 1px;
    background-color: var(--gray-medium);
    margin: 16px 0;
}

.divider-text {
    display: flex;
    align-items: center;
    margin: 16px 0;
}

.divider-text:before,
.divider-text:after {
    content: "";
    flex: 1;
    border-bottom: 1px solid var(--gray-medium);
}

.divider-text:before {
    margin-right: 8px;
}

.divider-text:after {
    margin-left: 8px;
}

/* 自適應微調 */
@media (max-height: 700px) {
    .app-container {
        height: 700px;
    }
}

/* 移動效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* 睡眠質量評分 */
.sleep-rating {
    padding: 20px 0;
}

.rating-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    position: relative;
}

.rating-info {
    display: flex;
    align-items: center;
}

.rating-hours {
    color: #8E8E93;
    font-size: 14px;
    margin-left: 8px;
}

.rating-emoji {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.rating-slider {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 4px;
    background-color: #E0E0E0;
    transform: translateY(-50%);
    z-index: -1;
}

.slider-handle {
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: var(--primary-color);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* 表達分析 */
.expression-analysis {
    padding: 20px;
}

.analysis-textarea {
    width: 100%;
    min-height: 150px;
    border: none;
    resize: none;
    font-size: 16px;
    padding: 10px;
    border-radius: 8px;
    background-color: #F8F8F8;
    margin-bottom: 20px;
}

.word-count {
    text-align: right;
    font-size: 14px;
    color: #8E8E93;
    margin-bottom: 20px;
}

.voice-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 20px;
    background-color: #E0E0E0;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
}

.continue-button {
    background-color: var(--text-color);
    color: white;
    padding: 14px 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.continue-button i {
    margin-left: 8px;
} 