/* ========================================
   SGF页面专用样式
   ======================================== */

/* ========================================
   1. 基础组件样式
   ======================================== */

/* 按钮样式 */
.btn-compact {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.25rem !important;
}

.btn-width-80 {
    width: 80px !important;
}

/* 粘性定位 */
.sticky-top-1rem {
    top: 1rem !important;
}

/* 紧凑按钮 */
.btn-compact-padding {
    padding: 0rem 0.2rem !important;
}

/* 徽章样式 */
.badge-compact {
    min-width: 70px !important;
    font-size: 0.9em !important;
}

.badge .bi-circle-fill {
    font-size: 0.6em;
    vertical-align: middle;
}

.badge .bi-circle {
    font-size: 0.6em;
    vertical-align: middle;
}

/* 深色背景badge的图标使用白色 */
.badge.bg-dark .bi-circle-fill,
.badge.bg-black .bi-circle-fill {
    color: #fff;
}

/* 浅色背景badge的图标使用黑色 */
.badge.bg-white .bi-circle {
    color: #000;
}

/* 表单样式 */
.form-select-auto {
    width: auto !important;
}

.label-compact {
    min-width: 70px !important;
    font-size: 0.9em !important;
}

/* ========================================
   2. 表格样式
   ======================================== */

/* 表格列宽 */
.table-col-30 {
    width: 30% !important;
    padding: 1rem 0.75rem !important;
}

.table-col-20 {
    width: 20% !important;
    padding: 1rem 0.75rem !important;
}

.table-col-15 {
    width: 15% !important;
    padding: 1rem 0.75rem !important;
}

.table-col-35 {
    width: 35% !important;
    padding: 1rem 0.75rem !important;
}

.table-col-18 {
    width: 18% !important;
    padding: 1rem 0.75rem !important;
}

.table-col-15 {
    width: 15% !important;
    padding: 1rem 0.75rem !important;
}

.table-col-12 {
    width: 12% !important;
    padding: 1rem 0.75rem !important;
}

.table-col-9 {
    width: 9% !important;
    padding: 1rem 0.75rem !important;
}

.table-col-8 {
    width: 8% !important;
    padding: 1rem 0.75rem !important;
}

.table-col-5 {
    width: 5% !important;
    padding: 1rem 0.75rem !important;
}

/* 表格行和单元格 */
.table-row-transition {
    transition: all 0.3s ease !important;
}

.table-cell-padding {
    padding: 1rem 0.75rem !important;
    vertical-align: middle !important;
}

/* ========================================
   3. 棋手信息样式
   ======================================== */

/* 个人资料图片 */
.profile_pb,
.profile_pw {
    width: 28px !important;
    height: 32px !important;
    border: 1px solid gray !important;
    transition: all 0.3s ease;
}

.profile_pb:hover,
.profile_pw:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 头像尺寸 */
.avatar-medium {
    width: 28px !important;
    height: 32px !important;
}

/* 棋子图标 */
.stone-icon-medium {
    width: 15px !important;
    height: 15px !important;
}

.stone-icon-black-position {
    left: -7.5px !important;
    top: 24.5px !important;
}

.stone-icon-white-position {
    left: -7.5px !important;
    top: 24.5px !important;
}

/* ========================================
   4. 国旗和图标样式
   ======================================== */

.flag-icon {
    border-radius: 2px;
    object-fit: cover;
    border: 1px solid #ccc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.flag-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* 国旗位置样式 */
.flag-black-position {
    left: 18.5px !important;
    top: 24.5px !important;
    width: 19px !important;
    height: 15px !important;
    z-index: 2 !important;
}

.flag-white-position {
    right: -9.5px !important;
    top: 24.5px !important;
    width: 19px !important;
    height: 15px !important;
    z-index: 2 !important;
}

/* 奖杯图标位置样式 - 几何中心对齐顶点 */
.trophy-black-position {
    top: 0 !important;
    right: 0 !important;
    transform: translate(50%, -50%) !important;
    font-size: 16px !important;
    z-index: 3 !important;
}

.trophy-white-position {
    top: 0 !important;
    left: 0 !important;
    transform: translate(-50%, -50%) !important;
    font-size: 16px !important;
    z-index: 3 !important;
}

/* ========================================
   5. 进度条样式
   ======================================== */

.progress-compact {
    height: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.progress-bar-compact {
    height: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ========================================
   6. Tipbar 样式
   ======================================== */

/* Tipbar 基础样式 */
.alert {
    transition: all 0.3s ease;
    animation: slideInDown 0.5s ease-out;
}

.alert:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Tipbar 动画效果 */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tipbar 关闭按钮 */
.btn-close {
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.btn-close:hover {
    opacity: 1;
}

/* ========================================
   7. 对话框样式
   ======================================== */

.qrcode-container {
    width: 250px !important;
    height: 250px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* ========================================
   8. 时间图标样式
   ======================================== */

.time-icon {
    font-size: 0.9rem !important;
}


/* ========================================
   10. 响应式设计
   ======================================== */

/* 移动端 Tipbar 优化 */
@media (max-width: 768px) {
    .alert {
        margin: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    .alert i {
        font-size: 1.125rem !important;
    }

    .btn-close {
        padding: 0.25rem;
    }
}