/**
 * 公會系統樣式
 * 不使用 Bootstrap，完全自定義
 */

/* ==========================================
   頁面佈局修復 - 確保 footer 固定在底部
   ========================================== */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ==========================================
   公會頁面容器
   ========================================== */
.guild-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 4rem 1rem;
    flex: 1;
    min-height: calc(100vh - 200px);
}

/* ==========================================
   Grid 系統
   ========================================== */
.guild-row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.75rem;
}

.guild-col-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0.75rem;
    box-sizing: border-box;
}

.guild-col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0.75rem;
    box-sizing: border-box;
}

.guild-col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0.75rem;
    box-sizing: border-box;
}

@media (max-width: 992px) {
    .guild-col-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .guild-col-4,
    .guild-col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ==========================================
   卡片樣式
   ========================================== */
.guild-card-wrap {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.guild-card-wrap:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.guild-card-header {
    padding: 1rem 1.25rem;
    color: white;
}

.guild-card-header.bg-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
}

.guild-card-header.bg-success {
    background: linear-gradient(135deg, #00c9ff 0%, #92fe9d 100%);
}

.guild-card-header.bg-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.guild-card-header.bg-warning {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
}

.guild-card-header.bg-secondary {
    background: #6c757d;
}

.guild-card-header h4 {
    margin: 0;
    font-size: 1.25rem;
}

.guild-card-body {
    padding: 1.25rem;
    flex: 1;
}

.guild-description-preview {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: calc(1.5em * 5);
    word-break: break-word;
    word-wrap: break-word;
    white-space: pre-line;
}

.guild-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.guild-card-img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.guild-card-img-placeholder i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
}

/* ==========================================
   按鈕樣式
   ========================================== */
.guild-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.guild-btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
}

.guild-btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    color: white;
}

.guild-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    color: white;
}

.guild-btn-success {
    background: linear-gradient(135deg, #00c9ff 0%, #92fe9d 100%);
    color: white;
}

.guild-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 201, 255, 0.4);
    color: white;
}

.guild-btn-warning {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    color: white;
}

.guild-btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.guild-btn-secondary {
    background: #6c757d;
    color: white;
}

.guild-btn-outline {
    background: transparent;
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
}

.guild-btn-outline:hover {
    background: #ff6b6b;
    color: white;
}

.guild-btn-outline-light {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: white;
}

.guild-btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
}

.guild-btn-outline-light.active {
    background: white;
    color: #ff6b6b;
}

.guild-btn-group {
    display: inline-flex;
    gap: 0.25rem;
}

/* ==========================================
   徽章樣式
   ========================================== */
.guild-badge {
    display: inline-block;
    padding: 0.35rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

.guild-badge-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    color: white;
}

.guild-badge-success {
    background: linear-gradient(135deg, #00c9ff 0%, #92fe9d 100%);
    color: white;
}

.guild-badge-warning {
    background: linear-gradient(135deg, #feca57 0%, #ff9ff3 100%);
    color: white;
}

.guild-badge-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.guild-badge-danger {
    background: #dc3545;
    color: white;
}

.guild-badge-secondary {
    background: #6c757d;
    color: white;
}

/* ==========================================
   分頁樣式
   ========================================== */
.guild-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.guild-pagination a,
.guild-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    color: #ff6b6b;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.guild-pagination a:hover {
    background: #ff6b6b;
    color: white;
    transform: translateY(-2px);
}

.guild-pagination .active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    color: white;
}

/* ==========================================
   頁面標題
   ========================================== */
.guild-page-header {
    margin-bottom: 3rem;
    padding: 0;
}

.guild-header-content {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
    position: relative;
    overflow: hidden;
}

.guild-header-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-10%, -10%) rotate(180deg); }
}

.guild-header-main {
    text-align: center;
    position: relative;
    z-index: 1;
}

.guild-page-header h1 {
    font-size: 2.8rem;
    color: #ffffff;
    margin: 0 0 0.75rem 0;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.guild-page-header h1 i {
    margin-right: 0.75rem;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.guild-page-header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.15rem;
    margin: 0;
    font-weight: 300;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.guild-header-badge {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.guild-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    color: #ff6b6b;
    padding: 0.875rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.guild-badge-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: #ffffff;
    border-color: #ffd700;
    color: #ff6b6b;
}

.guild-badge-link i:first-child {
    color: #ff6b6b;
    font-size: 1.1rem;
}

.guild-badge-link i:last-child {
    color: #ff6b6b;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.guild-badge-link:hover i:last-child {
    transform: translateX(4px);
}

.badge-label {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.badge-name {
    color: #ff6b6b;
    font-weight: 700;
    font-size: 1.05rem;
}

.guild-badge-link:hover .badge-name {
    color: #ff6b6b;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .guild-header-content {
        padding: 2rem 1.5rem;
    }
    
    .guild-page-header h1 {
        font-size: 2rem;
    }
    
    .guild-page-header p {
        font-size: 1rem;
    }
    
    .guild-badge-link {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .badge-label,
    .badge-name {
        font-size: 0.85rem;
    }
}

/* ==========================================
   排行榜頭部
   ========================================== */
.guild-ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ==========================================
   Tab 導航（自定義，不用 Bootstrap）
   ========================================== */
.guild-tabs {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.guild-tab {
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.guild-tab:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.05);
}

.guild-tab.active {
    color: #ff6b6b;
    border-bottom-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.guild-tab-content {
    display: none;
}

.guild-tab-content.active {
    display: block;
}

/* ==========================================
   表單樣式
   ========================================== */
.guild-form-group {
    margin-bottom: 1rem;
}

.guild-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.guild-form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.guild-form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

textarea.guild-form-control {
    resize: vertical;
    min-height: 100px;
}

.guild-form-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.guild-img-fluid {
    max-width: 100%;
    height: auto;
}

/* ==========================================
   成員列表
   ========================================== */
.guild-member-card {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.guild-member-card:hover {
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.15);
    transform: translateY(-2px);
    border-color: rgba(255, 107, 107, 0.3);
}

.guild-member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1rem;
}

.guild-member-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
}

.guild-member-info {
    flex: 1;
}

.guild-member-name {
    font-weight: 600;
    margin: 0 0 0.25rem 0;
}

.guild-member-role {
    font-size: 0.875rem;
    color: #6c757d;
}

/* ==========================================
   留言板
   ========================================== */
.guild-message-item {
    padding: 1.25rem;
    border-bottom: 1px solid #e9ecef;
    background: white;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.guild-message-item:hover {
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.1);
}

.guild-message-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.guild-message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.guild-message-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.guild-message-content {
    word-wrap: break-word;
    word-break: break-word;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    white-space: normal;
    color: #333;
}

.guild-message-content br {
    line-height: 1.5;
    display: block;
    margin: 0;
    content: "";
}

.guild-message-content br + br {
    margin-top: 0.25em;
}

.guild-message-actions {
    display: flex;
    gap: 0.5rem;
}

.guild-message-action-btn {
    padding: 0.25rem 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.guild-message-action-btn:hover {
    background: #f8f9fa;
}

.guild-message-action-btn.danger:hover {
    background: #dc3545;
    color: white;
    border-color: #dc3545;
}

/* ==========================================
   消息/公告卡片
   ========================================== */
.guild-post-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.guild-post-card:hover {
    box-shadow: 0 4px 20px rgba(255, 107, 107, 0.15);
    transform: translateY(-2px);
}

.guild-post-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.05) 0%, rgba(255, 165, 0, 0.05) 100%);
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guild-post-body {
    padding: 1rem;
}

.guild-post-images {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.guild-post-images img {
    max-width: 400px;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.guild-post-images img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 圖片放大模态框 */
.guild-image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.guild-image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.guild-image-modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.guild-image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.guild-image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.guild-image-modal-close:active {
    transform: rotate(90deg) scale(0.9);
}

/* ==========================================
   空狀態
   ========================================== */
.guild-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.guild-empty-state i {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
    display: block;
}

/* ==========================================
   工具類別
   ========================================== */
.guild-text-muted { color: #6c757d; }
.guild-text-center { text-align: center; }
.guild-text-small { font-size: 0.875rem; }

.guild-mb-3 { margin-bottom: 1rem; }
.guild-mb-4 { margin-bottom: 1.5rem; }
.guild-mb-5 { margin-bottom: 2rem; }
.guild-mt-4 { margin-top: 1.5rem; }
.guild-my-5 { margin-top: 2rem; margin-bottom: 2rem; }

.guild-d-flex { display: flex; }
.guild-justify-between { justify-content: space-between; }
.guild-align-center { align-items: center; }
.guild-flex-wrap { flex-wrap: wrap; }
.guild-gap-2 { gap: 0.5rem; }

/* ==========================================
   響應式設計
   ========================================== */
@media (max-width: 768px) {
    .guild-container {
        padding: 1rem;
    }
    
    .guild-page-header h1 {
        font-size: 1.75rem;
    }
    
    .guild-ranking-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .guild-tabs {
        overflow-x: auto;
    }
    
    .guild-member-card {
        flex-direction: column;
        text-align: center;
    }
    
    .guild-member-avatar,
    .guild-member-avatar-placeholder {
        margin-right: 0;
        margin-bottom: 0.75rem;
    }
}

/* ==========================================
   橫幅圖片
   ========================================== */
.guild-banner {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: block;
}

/* ==========================================
   公會詳情頁標題區
   ========================================== */
.guild-detail-header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.guild-detail-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: shimmer 8s ease-in-out infinite;
}

.guild-detail-title {
    position: relative;
    z-index: 1;
    flex: 1;
}

.guild-detail-title h1 {
    font-size: 2.5rem;
    margin: 0;
    color: #ffffff;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.guild-detail-title h1 i {
    margin-right: 0.75rem;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.guild-detail-meta {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-top: 0.5rem;
}

.guild-detail-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

/* ==========================================
   Alert 提示框
   ========================================== */
.guild-alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.guild-alert i {
    margin-top: 0.15rem;
}

.guild-alert-info {
    background: #e7f3ff;
    color: #0c5460;
    border: 1px solid #b8daff;
}

.guild-alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.guild-alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.guild-alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==========================================
   統計卡片
   ========================================== */
.guild-stat-card {
    border-radius: 12px;
    padding: 1.25rem;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.guild-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.guild-stat-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guild-stat-info {
    flex: 1;
}

.guild-stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.guild-stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.guild-stat-icon {
    font-size: 3rem;
    opacity: 0.5;
}

/* ==========================================
   快速操作按鈕
   ========================================== */
.guild-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.guild-quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.5rem;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    background: white;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    position: relative;
}

.guild-quick-action-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.guild-quick-action-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #667eea;
}

.guild-quick-action-btn span {
    font-weight: 500;
}

.guild-quick-action-btn .guild-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

/* ==========================================
   列表項目
   ========================================== */
.guild-list-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}

.guild-list-item:last-child {
    border-bottom: none;
}

/* ==========================================
   Modal 樣式
   ========================================== */
.guild-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.guild-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.guild-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
}

.guild-modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.guild-modal-header h4 {
    margin: 0;
    font-size: 1.25rem;
}

.guild-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.guild-modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.guild-modal-body {
    padding: 1.25rem;
}

.guild-modal-footer {
    padding: 1.25rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.guild-btn-danger {
    background: #dc3545;
    color: white;
}

.guild-btn-danger:hover {
    background: #c82333;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

/* ==========================================
   表單頁面樣式改進
   ========================================== */
.guild-form-group {
    margin-bottom: 1.5rem;
}

.guild-form-group:last-child {
    margin-bottom: 0;
}

/* 消息類型選擇器樣式 */
.guild-type-selector {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.guild-type-option {
    flex: 1;
    position: relative;
}

.guild-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.guild-type-option .guild-type-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    background: white;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
}

.guild-type-option input[type="radio"]:checked + .guild-type-btn,
.guild-type-option .guild-type-btn.active {
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.guild-type-option input[type="radio"][value="event"]:checked + .guild-type-btn,
.guild-type-option input[type="radio"][value="event"] + .guild-type-btn.active {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.guild-type-option input[type="radio"][value="announcement"]:checked + .guild-type-btn,
.guild-type-option input[type="radio"][value="announcement"] + .guild-type-btn.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.guild-type-option .guild-type-btn:hover {
    border-color: #667eea;
    transform: translateY(-1px);
}

/* 文件上傳樣式改進 */
input[type="file"].guild-form-control {
    padding: 0.5rem;
    border: 2px dashed #dee2e6;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="file"].guild-form-control:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

input[type="file"].guild-form-control:focus {
    border-color: #667eea;
    background: white;
    border-style: solid;
}

/* 複選框樣式改進 */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

/* 表單按鈕組 */
.guild-form-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

.guild-form-actions .guild-btn {
    width: 100%;
    justify-content: center;
}

/* 響應式設計 - 表單頁面 */
@media (max-width: 992px) {
    .guild-col-8,
    .guild-col-4 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .guild-col-4 {
        margin-top: 1.5rem;
    }
}

/* ==========================================
   響應式調整
   ========================================== */
@media (max-width: 992px) {
    .guild-stat-card {
        margin-bottom: 1rem;
    }
    
    .guild-col-4[style*="25%"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .guild-detail-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .guild-detail-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .guild-detail-actions .guild-btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 576px) {
    .guild-col-4[style*="25%"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .guild-quick-actions {
        flex-direction: column;
    }
    
    .guild-quick-action-btn {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
    }
    
    .guild-quick-action-btn i {
        margin-bottom: 0;
    }
    
    .guild-type-selector {
        flex-direction: column;
    }
    
    .guild-detail-title h1 {
        font-size: 1.75rem;
    }
}
