/* css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', 'Arial', sans-serif;
    color: #333;
    overflow-x: hidden;
    position: relative;
}

/* 固定背景圖片 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url(../img/bg.webp);
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
    background-repeat: no-repeat;
    opacity: 0.75;
    z-index: -1;
    pointer-events: none;
}

/* 手機版背景處理 */
@media (max-width: 768px) {
    body::before {
        position: absolute;
        background-attachment: scroll;
        min-height: 100%;
    }
}

/* 確保內容層級正確 */
.main-layout,
.rules-modal,
.modal {
    position: relative;
    z-index: 1;
}

.main-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* 左側資訊欄 */
.info-sidebar {
    width: 30%;
    /*max-width: 600px;*/
    /*background: rgba(255, 255, 255, 0.98);*/
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    overflow-y: auto;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-content {
    padding: 30px;
	    background: rgba(255, 255, 255, 0.3);
}

.close-sidebar-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.3em;
    cursor: pointer;
    z-index: 10;
}

.info-sidebar h2 {
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 15px;
    line-height: 1.4;
}

.incident-date {
    color: #555;
    line-height: 1.8;
    margin-bottom: 25px;
    font-size: 0.95em;
}

.info-section {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.info-section h3 {
    color: #2c3e50;
    font-size: 1.15em;
    margin-bottom: 12px;
}

.info-section p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 10px;
}

.info-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.info-section li {
    color: #555;
    line-height: 1.8;
    margin-bottom: 8px;
}

.contact-list li,
.support-list li,
.care-list li,
.routine-list li {
    /*list-style: none;*/
    padding-left: 0;
}

.note {
    font-size: 0.9em;
    color: #7f8c8d;
    font-style: italic;
    margin-top: 10px;
}

.highlight {
    background: linear-gradient(135deg, #ffe8e8 0%, #fff4e6 100%);
    border-left-color: #e74c3c;
}

.highlight2 {
    background: linear-gradient(135deg, #ffe8e8 0%, #fff8e8 100%);
    border-left-color: #e7d23c;
}

.highlight3 {
    background: linear-gradient(135deg, #e8ffe8 0%, #e8ffe8 100%);
    border-left-color: #66e73c;
}

.admin-link-container {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.admin-link-sidebar {
    display: inline-block;
    padding: 12px 25px;
    background: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s;
}

.admin-link-sidebar:hover {
    background: #34495e;
    transform: translateY(-2px);
}

/* 右側主內容區 */
.main-content {
    margin-left: 30%;
    width: 70%;
    padding: 20px;
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* 頂部操作欄 */
.top-bar {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.toggle-sidebar-btn {
    display: none;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #2c3e50;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    color: #2c3e50;
    transition: all 0.3s;
}

.toggle-sidebar-btn:hover {
    background: #2c3e50;
    color: white;
}

.header-title {
    flex: 1;
    text-align: center;
}

.header-title h1,h2 {
    color: white;
    /*font-size: 2.5em;*/
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.header-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2em;
    margin: 5px 0 0 0;
}

/* 響應式設計 */
@media (max-width: 1024px) {
    .info-sidebar {
        width: 350px;
        transform: translateX(-100%);
		background: rgba(255, 255, 255, 0.98);
    }
    
    .info-sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .toggle-sidebar-btn {
        display: block;
    }
    
    .close-sidebar-btn {
        display: block;
    }
    
    .header-title h1 {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .info-sidebar {
        width: 100%;
        max-width: 100%;
		background: rgba(255, 255, 255, 0.98);
    }
    
    .sidebar-content {
        padding: 20px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .header-title h1 {
        font-size: 1.6em;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 10px;
    }
}

/* 操作按鈕區 */
.action-buttons {
    text-align: center;
    margin-bottom: 30px;
}

.action-buttons button {
    margin: 0 10px 10px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    position: relative;
}

header h1 {
    font-size: 3em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.subtitle-en {
    font-size: 1.8em;
    margin-bottom: 10px;
    opacity: 0.95;
    font-weight: 300;
}

.subtitle {
font-size: 0.8em;
    opacity: 1;
    text-shadow: 2px 2px 2px #fdfdfd;
    text-align: left;
    color: #333333f0;
    font-weight: bold;
}

.admin-link {
    position: absolute;
    top: 0;
    right: 0;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 0.9em;
    transition: all 0.3s;
}

.admin-link:hover {
    background: rgba(255,255,255,0.3);
}

/* 規則彈窗 */
.rules-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    overflow-y: auto;
}

.rules-modal-content {
    background-color: #fff;
    margin: 3% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    height: 90vh;
}

.rules-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 25px;
    border-radius: 15px 15px 0 0;
    text-align: center;
}

.rules-header h2 {
    margin: 0;
    font-size: 1.8em;
}

.language-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.tab-btn {
    flex: 1;
    padding: 15px;
    background: transparent;
    border: none;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.tab-btn.active {
    background: white;
    color: #2c3e50;
    border-bottom: 3px solid #2c3e50;
}

.tab-btn:hover {
    background: rgba(0,0,0,0.05);
}

.rules-content {
    display: none;
    padding: 30px;
    line-height: 1.8;
	overflow-y: auto;
    max-height: calc(100% - 250px);
}

.rules-content.active {
    display: block;
}

.rules-content h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.rules-intro {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 20px;
    font-weight: 500;
}

.rules-list {
    margin-left: 20px;
    margin-bottom: 20px;
}

.rules-list li {
    margin-bottom: 15px;
    color: #333;
}

.rules-list li strong {
    color: #2c3e50;
}

.rules-list ul {
    margin-top: 8px;
    margin-left: 20px;
    list-style-type: circle;
}

.rules-list ul li {
    margin-bottom: 5px;
    color: #666;
}

.rules-footer {
    font-size: 1.05em;
    color: #2c3e50;
    font-weight: 500;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.accept-btn {
    display: block;
    width: calc(100% - 60px);
    margin: 20px 30px 30px;
    padding: 15px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.accept-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* 按鈕區域 */
.action-buttons {
    text-align: center;
    margin-bottom: 30px;
}

.action-buttons button {
    margin: 0 10px;
}

.add-wish-btn {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.1em;
    background: #fff;
    color: #2c3e50;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
    font-weight: bold;
}

.add-wish-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.add-wish-btn span {
    font-size: 1.5em;
    margin-right: 5px;
}

.my-wish-btn {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.1em;
    background: #fff;
    color: #34495e;
    border: 2px solid #34495e;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s;
    font-weight: bold;
}

.my-wish-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background: #34495e;
    color: white;
}

/* 我的許願區域 */
.my-wishes-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.section-header {
    display: block;
    margin-bottom: 20px;
    overflow: hidden;
}

.section-header h2 {
    float: left;
    color: #2c3e50;
    margin: 0;
    font-size: 1.8em;
}

.close-section-btn {
    float: right;
    background: #e74c3c;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
}

.close-section-btn:hover {
    background: #c0392b;
    transform: rotate(90deg);
}

/* Masonry 佈局 */
.masonry-container,
.my-wishes-grid {
    display: block;
    position: relative;
}

.masonry-item,
.my-wish-item {
    position: absolute;
    width: calc(25% - 15px);
    margin: 0;
    transition: all 0.3s ease;
}

.wish-card,
.my-wish-card {
    background: #FFF4E6;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.3s;
    position: relative;
    max-height: 300px;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.wish-card:hover,
.my-wish-card:hover {
	/*
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
	*/
	
      transform: scale(1.045) translateY(-4px);
      box-shadow: 0 8px 32px 0 rgba(119,85,194,0.08), 0 2px 12px 0 rgba(174,231,249,0.15);
      border: 2.5px solid #AEE7F9;
      z-index: 2;
}

.my-wish-card {
    padding-top: 35px;
	max-height:340px;
}

.wish-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
    z-index: 10;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.wish-author {
    font-weight: bold;
    margin-bottom: 10px;
    color: #2c3e50;
    font-size: 1.1em;
}

.wish-content-scroll {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
    max-height: 180px;
    padding-right: 5px;
}

/* 自定義滾動條 */
.wish-content-scroll::-webkit-scrollbar {
    width: 6px;
}

.wish-content-scroll::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 3px;
}

.wish-content-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.wish-content-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}

.wish-content {
    color: #555;
    line-height: 1.6;
    word-wrap: break-word;
}

.wish-date {
    text-align: right;
    font-size: 0.85em;
    color: #888;
    margin-top: auto;
}

.wish-footer {
    margin-top: 10px;
    overflow: hidden;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 10px;
}

.wish-footer .wish-date {
    float: left;
    text-align: left;
    margin: 0;
}

.edit-btn {
    float: right;
    background: #2c3e50;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.edit-btn:hover {
    background: #34495e;
}

.empty-message {
    text-align: center;
    color: white;
    font-size: 1.2em;
    padding: 60px 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    margin: 20px;
    grid-column: 1 / -1;
}

/* 彈出視窗 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    overflow-y: auto;
    padding: 20px;
}

.modal-content-wide {
    background-color: #fff;
    margin: 20px auto;
    padding: 30px;
    border-radius: 15px;
    width: 95%;
    max-width: 1100px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    position: relative;
}

.close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.close:hover {
    color: #000;
}

.modal-content-wide h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    padding-right: 40px;
}

/* 表單容器 - 左右佈局 */
.form-container {
    display: flex;
    gap: 30px;
}

.form-left {
    flex: 1;
    min-width: 0;
}

.form-right {
    width: 380px;
    flex-shrink: 0;
}

/* 範本區域 */
.templates-container {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.templates-container h3 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-size: 1.3em;
}

.template-hint {
    color: #666;
    font-size: 0.85em;
    margin-bottom: 20px;
    font-style: italic;
}

.template-section {
    margin-bottom: 25px;
}

.template-section h4 {
    color: #34495e;
    margin-bottom: 10px;
    font-size: 1.05em;
    padding-bottom: 5px;
    border-bottom: 2px solid #dee2e6;
}

.template-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.template-list li {
    padding: 10px 12px;
    margin: 5px 0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #e0e0e0;
    font-size: 0.95em;
    line-height: 1.5;
}

.template-list li:hover {
    background: #e3f2fd;
    border-color: #2c3e50;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.template-list li:active {
    transform: translateX(5px) scale(0.98);
}

/* 自訂範本容器的滾動條 */
.templates-container::-webkit-scrollbar {
    width: 8px;
}

.templates-container::-webkit-scrollbar-track {
    background: #e0e0e0;
    border-radius: 10px;
}

.templates-container::-webkit-scrollbar-thumb {
    background: #2c3e50;
    border-radius: 10px;
}

.templates-container::-webkit-scrollbar-thumb:hover {
    background: #34495e;
}

/* 表單樣式調整 */
.form-group {
    /*margin-bottom: 20px;*/
    clear: both;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c3e50;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 0.85em;
    color: #888;
    margin-top: 5px;
}

/* Emoji 選擇器 */
.emoji-picker {
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.emoji-btn {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1.5em;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    transform: scale(1.2);
    border-color: #2c3e50;
    background: #f0f0f0;
}

.emoji-btn:active {
    transform: scale(1.1);
}

.color-picker {
    /*overflow: hidden;*/
}

.color-picker input[type="radio"] {
    display: none;
}

.color-picker label {
    float: left;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    margin-right: 10px;
	border: 1px solid #ddd;
}

.color-picker input[type="radio"]:checked + label {
	border: 2px solid;
    border-color: #2c3e50;
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.4);
}

/* 清除浮動 */
.section-header:after,
.wish-footer:after,
.color-picker:after {
    content: "";
    display: table;
    clear: both;
}

/* 響應式設計 */
@media (max-width: 1200px) {
    .masonry-container,
    .my-wishes-grid {
        column-count: 3;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .subtitle-en {
        font-size: 1.3em;
    }
    
    .masonry-container,
    .my-wishes-grid {
        column-count: 2;
    }
    
    .action-buttons button {
        display: block;
        margin: 10px auto;
        width: 80%;
    }
    
    .admin-link {
        position: static;
        display: inline-block;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .masonry-container,
    .my-wishes-grid {
        column-count: 1;
    }
    
    .rules-modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
}

@media (max-width: 1200px) {
    .masonry-item,
    .my-wish-item {
        width: calc(33.333% - 15px);
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .subtitle-en {
        font-size: 1.3em;
    }
    
    .masonry-item,
    .my-wish-item {
        width: calc(50% - 15px);
    }
    
    .action-buttons button {
        display: block;
        margin: 10px auto;
        width: 80%;
    }
    
    .admin-link {
        position: static;
        display: inline-block;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .masonry-item,
    .my-wish-item {
        width: calc(100% - 15px);
    }
    
    .rules-modal-content {
        margin: 10px;
        width: calc(100% - 20px);
    }
}

@media (max-width: 900px) {
    .form-container {
        flex-direction: column;
    }
    
    .form-right {
        width: 100%;
    }
    
    .templates-container {
        max-height: 400px;
    }
    
    .modal-content-wide {
        width: 95%;
        margin: 10px auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .modal-content-wide {
        padding: 15px;
    }
    
    .modal-content-wide h2 {
        font-size: 1.3em;
    }
    
    .emoji-btn {
        width: 35px;
        height: 35px;
        font-size: 1.3em;
    }
    
    .template-list li {
        font-size: 0.9em;
        padding: 8px 10px;
    }
}


        .copy-container {
            display: flex;
            gap: 10px;
            align-items: center;
        }
        .url {
            padding: 8px;
            width: 100%;
        }
        .copy-btn {
			cursor: pointer;
			background: #347bff;
			padding: 8px;
			border-radius: 4px;
			border: 0;
			color: #fff;
			width:100px;
        }
        .copy-btn.copied {
            background-color: #4CAF50;
            color: white;
        }