/* ==========================================================================
   XHMT Plugin v2.12.0 - 新增骰子比大小紫色系
   ========================================================================== */

#xhmt-plugin-container {
    display: block;
    clear: both;
    width: 100%;
}

/* ---------- 包裝容器 ---------- */
#xhmt-plugin-container .xhmt-wrapper {
    margin: 30px 0 20px;
    clear: both;
    width: 100%;
}

/* ---------- 主區塊 ---------- */
#xhmt-plugin-container .xhmt-section {
    background: #ffffff;
    color: #333333;
    padding: 35px 28px;
    font-family: 'Microsoft JhengHei', '微軟正黑體', 'PingFang TC', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    border-radius: 20px;
    box-shadow: 0 12px 45px rgba(74, 108, 247, 0.08);
    border: 1px solid #eef2ff;
    position: relative;
    overflow: hidden;
}

#xhmt-plugin-container .xhmt-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #4a6cf7, #6a8eff, #8a63d2, #4a6cf7);
    background-size: 300% 100%;
    z-index: 1;
}

/* ---------- 容器 ---------- */
#xhmt-plugin-container .xhmt-container {
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ---------- 標題區 ---------- */
#xhmt-plugin-container .xhmt-header {
    text-align: center;
    margin-bottom: 35px;
}

#xhmt-plugin-container .xhmt-title {
    font-size: 2.4rem;
    margin: 0 0 15px;
    font-weight: 800;
    color: #1a202c;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

#xhmt-plugin-container .xhmt-title i {
    color: #4a6cf7;
    font-size: 2.1rem;
}

#xhmt-plugin-container .xhmt-subtitle {
    font-size: 1.25rem;
    color: #555;
    margin: 0 0 20px;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#xhmt-plugin-container .xhmt-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, #4a6cf7, #6a8eff);
    margin: 0 auto;
    border-radius: 4px;
}

/* ---------- 卡片網格 - 響應式多欄 ---------- */
#xhmt-plugin-container .xhmt-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 35px;
}

/* ---------- 工具卡片 - 統一水平置中 ---------- */
#xhmt-plugin-container .xhmt-card {
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    border-radius: 18px;
    padding: 30px 20px;
    text-align: center;
    border: 2px solid #f0f4ff;
    box-shadow: 0 8px 25px rgba(74, 108, 247, 0.06);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

#xhmt-plugin-container .xhmt-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(74, 108, 247, 0.15);
    border-color: #4a6cf7;
}

#xhmt-plugin-container .xhmt-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4a6cf7, #6a8eff);
    border-radius: 18px 18px 0 0;
}

/* ---------- 卡片圖示 - 置中 ---------- */
#xhmt-plugin-container .xhmt-card-icon {
    font-size: 3.5rem;
    color: #4a6cf7;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    text-align: center;
}

#xhmt-plugin-container .xhmt-card-icon::after {
    content: '';
    position: absolute;
    width: 90px;
    height: 90px;
    background: rgba(74, 108, 247, 0.1);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
}

/* ---------- 卡片標題 - 置中 ---------- */
#xhmt-plugin-container .xhmt-card-title {
    font-size: 1.6rem;
    margin: 0 0 16px;
    color: #1a202c;
    font-weight: 700;
    line-height: 1.3;
    width: 100%;
    text-align: center;
}

/* ---------- 卡片描述 - 置中 ---------- */
#xhmt-plugin-container .xhmt-card-desc {
    color: #555;
    line-height: 1.6;
    margin: 0 0 25px;
    font-size: 1.1rem;
    font-weight: 500;
    min-height: 70px;
    width: 100%;
    text-align: center;
}

/* ---------- 免註冊徽章 - 橘色 ---------- */
#xhmt-plugin-container .xhmt-badge {
    display: inline-block;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 6px 20px;
    border-radius: 30px;
    margin: 0 0 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 107, 74, 0.3);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: fit-content;
    align-self: center;
    background: #ff6b4a;
    color: white;
    white-space: nowrap;
}

/* ---------- 換行徽章 - 用於6等份抽獎轉盤 ---------- */
#xhmt-plugin-container .xhmt-badge-linebreak {
    display: inline-block;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 6px 20px;
    border-radius: 30px;
    margin: 0 0 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(255, 107, 74, 0.3);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: fit-content;
    align-self: center;
    background: #ff6b4a;
    color: white;
    white-space: normal;
    line-height: 1.4;
    min-width: 100px;
}

/* ---------- 註冊徽章 - 紫色 ---------- */
#xhmt-plugin-container .xhmt-badge-purple {
    display: inline-block;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 6px 20px;
    border-radius: 30px;
    margin: 0 0 20px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(159, 122, 234, 0.3);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: fit-content;
    align-self: center;
    background: #9f7aea;
    color: white;
    white-space: nowrap;
}

/* ---------- 卡片按鈕 - 置中 ---------- */
#xhmt-plugin-container .xhmt-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4a6cf7, #6a8eff);
    color: white;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    min-width: 150px;
    transition: all 0.3s ease;
    margin-top: 0;
    align-self: center;
    text-align: center;
}

#xhmt-plugin-container .xhmt-card-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

#xhmt-plugin-container .xhmt-card-btn:hover i {
    transform: translateX(5px);
}

/* ---------- 6等份抽獎轉盤 - 橘色系 ---------- */
#xhmt-plugin-container .xhmt-card-wheel {
    background: linear-gradient(145deg, #fff8f0, #fff4e6);
    border: 2px solid #ffd8b8;
}

#xhmt-plugin-container .xhmt-card-wheel::after {
    background: linear-gradient(90deg, #ff8a5c, #ff6b4a);
}

#xhmt-plugin-container .xhmt-card-wheel .xhmt-card-icon i {
    color: #ff8a5c;
}

#xhmt-plugin-container .xhmt-card-wheel .xhmt-card-icon::after {
    background: rgba(255, 138, 92, 0.15);
}

#xhmt-plugin-container .xhmt-card-wheel .xhmt-card-title {
    color: #e8593c;
}

/* ---------- 8等份抽獎轉盤 - 紫色系 ---------- */
#xhmt-plugin-container .xhmt-card-wheel-8 {
    background: linear-gradient(145deg, #faf5ff, #f3e8ff);
    border: 2px solid #e9d5ff;
}

#xhmt-plugin-container .xhmt-card-wheel-8::after {
    background: linear-gradient(90deg, #9f7aea, #805ad5);
}

#xhmt-plugin-container .xhmt-card-wheel-8 .xhmt-card-icon i {
    color: #9f7aea;
}

#xhmt-plugin-container .xhmt-card-wheel-8 .xhmt-card-icon::after {
    background: rgba(159, 122, 234, 0.15);
}

#xhmt-plugin-container .xhmt-card-wheel-8 .xhmt-card-title {
    color: #805ad5;
}

/* ---------- 骰子比大小 - 紫色系（與8等份相同） ---------- */
#xhmt-plugin-container .xhmt-card-dice {
    background: linear-gradient(145deg, #faf5ff, #f3e8ff);
    border: 2px solid #e9d5ff;
}

#xhmt-plugin-container .xhmt-card-dice::after {
    background: linear-gradient(90deg, #9f7aea, #805ad5);
}

#xhmt-plugin-container .xhmt-card-dice .xhmt-card-icon i {
    color: #9f7aea;
}

#xhmt-plugin-container .xhmt-card-dice .xhmt-card-icon::after {
    background: rgba(159, 122, 234, 0.15);
}

#xhmt-plugin-container .xhmt-card-dice .xhmt-card-title {
    color: #805ad5;
}

/* ---------- 轉盤專用按鈕 - 橘色 ---------- */
#xhmt-plugin-container .xhmt-btn-wheel {
    background: linear-gradient(135deg, #ff8a5c, #ff6b4a) !important;
    box-shadow: 0 10px 25px rgba(255, 106, 74, 0.3) !important;
}

/* ---------- 轉盤專用按鈕 - 紫色 ---------- */
#xhmt-plugin-container .xhmt-btn-purple {
    background: linear-gradient(135deg, #9f7aea, #805ad5) !important;
    box-shadow: 0 10px 25px rgba(159, 122, 234, 0.3) !important;
}

/* ---------- 新遊戲創作中 - 綠色系 ---------- */
#xhmt-plugin-container .xhmt-card-new {
    background: linear-gradient(145deg, #f5faf7, #ecf7f0);
    border: 2px solid #d3e6d9;
}

#xhmt-plugin-container .xhmt-card-new::after {
    background: linear-gradient(90deg, #2ecc71, #27ae60);
}

#xhmt-plugin-container .xhmt-card-new .xhmt-card-icon i {
    color: #2ecc71;
}

#xhmt-plugin-container .xhmt-card-new .xhmt-card-icon::after {
    background: rgba(46, 204, 113, 0.15);
}

#xhmt-plugin-container .xhmt-card-new .xhmt-card-title {
    color: #27ae60;
}

/* ---------- 即將上線 ---------- */
#xhmt-plugin-container .xhmt-coming-soon {
    background: linear-gradient(135deg, #8b96aa, #a0aec0) !important;
    cursor: default;
    opacity: 0.95;
    margin-top: 0;
}

#xhmt-plugin-container .xhmt-coming-soon:hover {
    transform: none;
    box-shadow: none;
}

/* ---------- 特色工具區塊 ---------- */
#xhmt-plugin-container .xhmt-featured {
    background: linear-gradient(135deg, #f8faff, #edf2ff);
    border-radius: 20px;
    padding: 30px;
    border: 2px solid #e0e7ff;
    box-shadow: 0 10px 30px rgba(74, 108, 247, 0.1);
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

#xhmt-plugin-container .xhmt-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4a6cf7, #6a8eff, #8a63d2);
}

#xhmt-plugin-container .xhmt-featured-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 25px;
    position: relative;
    z-index: 2;
}

#xhmt-plugin-container .xhmt-featured-icon {
    font-size: 3.8rem;
    color: #4a6cf7;
    background: white;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(74, 108, 247, 0.15);
    flex-shrink: 0;
    border: 3px solid #eef2ff;
}

#xhmt-plugin-container .xhmt-featured-info {
    flex: 1;
    min-width: 250px;
}

#xhmt-plugin-container .xhmt-featured-title {
    font-size: 2rem;
    margin: 0 0 12px;
    color: #1a202c;
    font-weight: 800;
    background: linear-gradient(135deg, #4a6cf7, #6a8eff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

#xhmt-plugin-container .xhmt-featured-desc {
    color: #555;
    line-height: 1.6;
    font-size: 1.2rem;
    margin: 0;
    font-weight: 500;
}

#xhmt-plugin-container .xhmt-featured-btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #4a6cf7, #6a8eff);
    color: white;
    box-shadow: 0 10px 25px rgba(74, 108, 247, 0.25);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* ---------- 頁尾 ---------- */
#xhmt-plugin-container .xhmt-footer {
    text-align: center;
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid #eef2ff;
}

#xhmt-plugin-container .xhmt-footer-text {
    font-size: 1.1rem;
    color: #6b7280;
    margin: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#xhmt-plugin-container .xhmt-footer-text::before {
    content: '💡';
    font-size: 1.2rem;
}

/* ==========================================================================
   平板電腦 - 768px 到 1024px
   ========================================================================== */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    #xhmt-plugin-container .xhmt-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    #xhmt-plugin-container .xhmt-card {
        padding: 25px 18px;
    }
    
    #xhmt-plugin-container .xhmt-card-title {
        font-size: 1.5rem;
    }
    
    #xhmt-plugin-container .xhmt-card-desc {
        font-size: 1.05rem;
        min-height: 65px;
    }
}

/* ==========================================================================
   手機版 - 768px 以下
   ========================================================================== */
@media screen and (max-width: 768px) {
    #xhmt-plugin-container .xhmt-section {
        padding: 25px 15px;
        margin: 20px 0 15px;
        border-radius: 16px;
    }
    
    #xhmt-plugin-container .xhmt-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-bottom: 25px;
    }
    
    #xhmt-plugin-container .xhmt-card {
        padding: 20px 12px;
        border-radius: 14px;
    }
    
    #xhmt-plugin-container .xhmt-card-icon {
        font-size: 2.5rem;
        margin-bottom: 12px;
    }
    
    #xhmt-plugin-container .xhmt-card-icon::after {
        width: 70px;
        height: 70px;
    }
    
    #xhmt-plugin-container .xhmt-card-title {
        font-size: 1.2rem;
        margin-bottom: 8px;
        word-break: break-word;
    }
    
    #xhmt-plugin-container .xhmt-card-desc {
        font-size: 0.9rem;
        margin-bottom: 15px;
        min-height: 50px;
        line-height: 1.4;
        word-break: break-word;
    }
    
    #xhmt-plugin-container .xhmt-badge,
    #xhmt-plugin-container .xhmt-badge-linebreak,
    #xhmt-plugin-container .xhmt-badge-purple {
        font-size: 0.75rem;
        padding: 4px 12px;
        margin-bottom: 12px;
    }
    
    #xhmt-plugin-container .xhmt-badge-linebreak {
        white-space: normal;
        line-height: 1.3;
        min-width: 80px;
    }
    
    #xhmt-plugin-container .xhmt-card-btn {
        padding: 8px 16px;
        min-width: 120px;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   超小螢幕手機 - 480px 以下
   ========================================================================== */
@media screen and (max-width: 480px) {
    #xhmt-plugin-container .xhmt-grid {
        gap: 12px;
    }
    
    #xhmt-plugin-container .xhmt-card {
        padding: 18px 10px;
    }
    
    #xhmt-plugin-container .xhmt-card-icon {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
    
    #xhmt-plugin-container .xhmt-card-icon::after {
        width: 60px;
        height: 60px;
    }
    
    #xhmt-plugin-container .xhmt-card-title {
        font-size: 1.1rem;
        margin-bottom: 6px;
    }
    
    #xhmt-plugin-container .xhmt-card-desc {
        font-size: 0.8rem;
        margin-bottom: 12px;
        min-height: 40px;
    }
    
    #xhmt-plugin-container .xhmt-badge-linebreak {
        font-size: 0.7rem;
        padding: 3px 10px;
        margin-bottom: 10px;
        min-width: 70px;
    }
}

/* ==========================================================================
   確保所有內容水平置中
   ========================================================================== */
#xhmt-plugin-container .xhmt-card * {
    max-width: 100%;
    text-align: center;
}

#xhmt-plugin-container .xhmt-card a {
    text-decoration: none;
}

#xhmt-plugin-container .xhmt-card a:hover {
    color: white;
}