* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft JhengHei', 'PingFang TC', 'Helvetica Neue', Arial, sans-serif;
    background: #F8F6F3;
    padding: 24px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #FFFFFF;
    padding: 48px 56px;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

/* 頂部標題區域 - 法式簡約風格 */
.header-section {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 48px;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

/* 漢堡選單按鈕（手機版顯示） */
.hamburger-btn {
    display: none;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    padding: 8px;
    z-index: 1001;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #7A7570;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* 側邊欄選單 */
.sidebar-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #FAF9F7;
    z-index: 2000;
    transition: right 0.3s ease;
    box-shadow: -2px 0 16px rgba(120, 110, 100, 0.15);
}

.sidebar-menu.open {
    right: 0;
}

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.sidebar-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #FAF9F7;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #D4CFC8;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: #7A7570;
}

.close-sidebar-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #7A7570;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.close-sidebar-btn:hover {
    color: #B8B2A8;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    color: #7A7570;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #F5F3F0;
    border-left-color: #B8B2A8;
    color: #6B6B6B;
}

.nav-item.has-submenu .submenu-toggle {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-item.has-submenu.active .submenu-toggle {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #F5F3F0;
}

.submenu.open {
    max-height: 200px;
}

.submenu-item {
    display: block;
    padding: 12px 24px 12px 48px;
    color: #7A7570;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.3s ease;
}

.submenu-item:hover {
    background: #E8E5E0;
    color: #6B6B6B;
}

h1 {
    color: #7A7570;
    margin: 0;
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

h2 {
    color: #7A7570;
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 1px;
}

/* 設定區域 */
.settings-section {
    margin-bottom: 48px;
    padding: 32px;
    background: #FAF9F7;
    border: 1px solid #D4CFC8;
    border-radius: 0;
}

/* 文件連結區域 */
.doc-links-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

.doc-link-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-link-item label {
    font-size: 15px;
    font-weight: 500;
    color: #7A7570;
    letter-spacing: 0.5px;
}

.doc-link-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.doc-link-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #D4CFC8;
    border-radius: 0;
    font-size: 14px;
    font-family: 'Microsoft JhengHei', 'PingFang TC', Arial, sans-serif;
    color: #6B6B6B;
    background-color: #FFFFFF;
    transition: all 0.3s ease;
}

.doc-link-input-group input:focus {
    outline: none;
    border-color: #B8B2A8;
    box-shadow: 0 0 0 3px rgba(184, 178, 168, 0.08);
}

.save-link-btn,
.open-link-btn {
    padding: 12px 20px;
    border: 1px solid #D4CFC8;
    border-radius: 0;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Microsoft JhengHei', 'PingFang TC', Arial, sans-serif;
    white-space: nowrap;
}

.save-link-btn {
    background: #B8B2A8;
    color: #FFFFFF;
    border-color: #B8B2A8;
}

.save-link-btn:hover {
    background: #A8A39A;
    border-color: #A8A39A;
}

.open-link-btn {
    background: transparent;
    color: #7A7570;
}

.open-link-btn:hover {
    background: #F5F3F0;
    border-color: #C8C2B8;
}

/* 自我介紹區域 */
.intro-section {
    margin-top: 40px;
}

.intro-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.intro-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.intro-column label {
    font-size: 15px;
    font-weight: 500;
    color: #7A7570;
    letter-spacing: 0.5px;
}

.intro-column textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #D4CFC8;
    border-radius: 0;
    font-size: 14px;
    font-family: 'Microsoft JhengHei', 'PingFang TC', Arial, sans-serif;
    color: #6B6B6B;
    background-color: #FFFFFF;
    transition: all 0.3s ease;
    resize: vertical;
    line-height: 1.7;
}

.intro-column textarea:focus {
    outline: none;
    border-color: #B8B2A8;
    box-shadow: 0 0 0 3px rgba(184, 178, 168, 0.08);
}

.save-intro-btn {
    align-self: flex-start;
    padding: 12px 20px;
    background: #B8B2A8;
    color: #FFFFFF;
    border: 1px solid #B8B2A8;
    border-radius: 0;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Microsoft JhengHei', 'PingFang TC', Arial, sans-serif;
}

.save-intro-btn:hover {
    background: #A8A39A;
    border-color: #A8A39A;
}

/* 月份頁籤 - 法式優雅風格 */
.month-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 48px;
    justify-content: center;
    border-bottom: 1px solid #E8E5E0;
    padding-bottom: 0;
}

.month-tab {
    flex: 0 0 auto;
    padding: 16px 40px;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    font-size: 16px;
    font-weight: 400;
    font-family: 'Microsoft JhengHei', 'PingFang TC', Arial, sans-serif;
    background: transparent;
    color: #A8A39A;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    letter-spacing: 1px;
}

.month-tab:hover {
    color: #7A7570;
    background: transparent;
}

.month-tab.active {
    color: #7A7570;
    background: transparent;
    border-bottom-color: #B8B2A8;
    font-weight: 500;
}

.month-tab:active {
    transform: none;
}

/* 卡片網格 - 法式網格布局 */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 0;
}

/* 單張卡片 - 法式簡約卡片 */
.day-card {
    background: #FFFFFF;
    border: 1px solid #E8E5E0;
    border-radius: 0;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    position: relative;
}

.day-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: transparent;
    transition: background 0.3s ease;
}

.day-card:hover {
    border-color: #D4C4B0;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(44, 44, 44, 0.08);
}

.day-card:hover::before {
    background: #D4C4B0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #F0EDE8;
}

.day-label {
    font-size: 14px;
    font-weight: 500;
    color: #7A7570;
    letter-spacing: 0.5px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.status-approved {
    background-color: #7A8B7A !important;
}

.status-revision {
    background-color: #C4B4A0 !important;
}

.status-pending {
    background-color: #D4C4B0 !important;
    color: #4A4540 !important;
}

.card-content {
    flex: 1;
    margin-bottom: 20px;
}

.content-preview {
    font-size: 14px;
    color: #6B6B6B;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 76px;
    font-weight: 300;
}

.card-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #F0EDE8;
}

.edit-btn {
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    color: #7A7570;
    border: 1px solid #D4CFC8;
    border-radius: 0;
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    font-family: 'Microsoft JhengHei', 'PingFang TC', Arial, sans-serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.edit-btn:hover {
    background: #B8B2A8;
    color: #FFFFFF;
    border-color: #B8B2A8;
    transform: none;
}

.edit-btn:active {
    transform: none;
    background: #A8A39A;
}

/* 載入提示 */
.loading-message {
    text-align: center;
    padding: 60px;
    font-size: 14px;
    color: #8B8B8B;
    display: none;
    font-weight: 300;
    letter-spacing: 1px;
}

/* 響應式設計 - 手機版 */
@media screen and (max-width: 767px) {
    body {
        padding: 0;
        font-size: 15px;
    }
    
    .container {
        padding: 24px 16px;
        border-radius: 0;
        box-shadow: none;
        max-width: 100%;
    }
    
    .header-section {
        margin-bottom: 32px;
        position: relative;
        padding-right: 48px; /* 為漢堡按鈕留出空間 */
    }
    
    /* 手機版顯示漢堡按鈕 */
    .hamburger-btn {
        display: flex !important;
    }
    
    h1 {
        font-size: 24px;
        letter-spacing: 1px;
        margin-left: 0;
    }
    
    h2 {
        font-size: 18px;
    }
    
    /* 設定區域 */
    .settings-section {
        padding: 20px;
        margin-bottom: 32px;
    }
    
    /* 文件連結區域 - 手機版單欄 */
    .doc-links-section {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 32px;
    }
    
    .doc-link-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .doc-link-input-group input {
        width: 100%;
    }
    
    .save-link-btn,
    .open-link-btn {
        width: 100%;
        padding: 14px;
        min-height: 44px;
    }
    
    /* 自我介紹區域 - 手機版單欄 */
    .intro-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .save-intro-btn {
        width: 100%;
        padding: 14px;
        min-height: 44px;
    }
    
    /* 月份頁籤 */
    .month-tabs {
        gap: 0;
        margin-bottom: 32px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .month-tab {
        flex: 0 0 auto;
        padding: 14px 20px;
        font-size: 15px;
        min-width: 100px;
    }
    
    /* 卡片網格 - 手機版單欄 */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .day-card {
        padding: 20px;
        min-height: 180px;
    }
    
    .day-label {
        font-size: 13px;
    }
    
    .status-badge {
        padding: 4px 10px;
        font-size: 10px;
    }
    
    .content-preview {
        font-size: 14px;
        min-height: 70px;
        line-height: 1.7;
    }
    
    .edit-btn {
        padding: 14px;
        font-size: 12px;
        min-height: 44px;
    }
}

/* 平板版 */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .container {
        padding: 40px 32px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* 大螢幕 */
@media screen and (min-width: 1025px) {
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 超大螢幕 */
@media screen and (min-width: 1400px) {
    .cards-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}
