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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f3f4f6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* 手機外殼 */
.phone-shell {
    width: 100%;
    max-width: 400px;
    height: 800px;
    background-color: #7494c0;
    border-radius: 3rem;
    border: 8px solid #1f2937;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* LINE 頂部狀態列 */
.header {
    background-color: #7494c0;
    padding: 24px 24px 8px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-title {
    font-weight: bold;
    font-size: 1.125rem;
}

/* 聊天內容區 */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.date-tag {
    align-self: center;
    background-color: rgba(0, 0, 0, 0.1);
    color: white;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 9999px;
}

/* 訊息包裝器 */
.message-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 85%;
}

.message-flex {
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

/* 頭像 */
.avatar {
    width: 40px;
    height: 40px;
    background-color: #2563eb;
    color: white;
    border-radius: 9999px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid white;
    flex-shrink: 0;
}

/* 訊息氣泡 */
.bubble {
    background-color: white;
    border-radius: 1rem;
    padding: 16px;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    color: #1f2937;
}

/* 氣泡小尖角 */
.bubble::before {
    content: "";
    position: absolute;
    left: -6px;
    bottom: 12px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-right: 8px solid white;
    border-bottom: 6px solid transparent;
}

.bubble-title {
    font-weight: bold;
    color: #2563eb;
    margin-bottom: 8px;
    display: block;
}

.bubble-intro {
    font-size: 0.875rem;
    margin-bottom: 12px;
    line-height: 1.625;
}

.bold-text {
    font-weight: bold;
    color: black;
}

/* 內容區塊 */
.info-section {
    background-color: #f9fafb;
    padding: 8px;
    border-radius: 0.5rem;
    border: 1px solid #f3f4f6;
    margin-bottom: 16px;
    font-size: 0.75rem;
}

.info-section-title {
    font-weight: bold;
    color: #6b7280;
    margin-bottom: 4px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 4px;
}

.info-row {
    margin-bottom: 2px;
}

.info-label {
    color: #9ca3af;
}

.bubble-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed #d1d5db;
    font-size: 10px;
    color: #9ca3af;
    text-align: center;
}

.time-stamp {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    padding-bottom: 4px;
}

/* 輸入列 */
.input-area {
    background-color: white;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon {
    color: #9ca3af;
    width: 24px;
    height: 24px;
}

.input-placeholder {
    flex: 1;
    background-color: #f3f4f6;
    border-radius: 9999px;
    padding: 6px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-text {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* 底部導覽條 (iPhone) */
.home-bar-container {
    background-color: white;
    padding-bottom: 8px;
    display: flex;
    justify-content: center;
}

.home-bar {
    width: 128px;
    height: 6px;
    background-color: #e5e7eb;
    border-radius: 9999px;
}

/* 捲軸美化 */
.chat-body::-webkit-scrollbar {
    width: 4px;
}
.chat-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
