/**
 * Fair Stake Token 应用样式
 * 基于Bulma框架的自定义样式
 */

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
    background-size: 30px 30px;
}
 .test-show{
    display: none;
}

.test div.test-show{
    display:block;
}

.test span.test-show{
    display:inline;
}
.test button.test-show{
    display:inline-block;
}


#tokenAddress{
    height: 3.5rem !important;
    font-size: 1.25rem;
}

.main-content {   
    padding-top: 6.5rem;
    min-height:100vh;
}
/* Arabic special styles */
body[lang="ar"] .main-content {
    direction: rtl;
}
a{
    color:var(--bulma-navbar-item-color);
}


/* 假设导航高度为80px */
.main-content .container >.card {
   scroll-margin-top: 7.5rem;
}
.logo-title {
    font-weight: 900;
    font-family: montserrat;
}

.navbar{
    padding: 1rem 2rem;
    font-size: 1.25rem;
    border-bottom: 1px #f3f3f3 solid;
}

.navbar i {
    font-size:1.65rem;
    color:var(--bulma-text-weak);
}
.navbar-end img, .bd-navbar-mobile-icon img {
    width: 2.15rem;
    height: auto;
    max-height: unset;
}


.navbar-item:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-1px);
}

.navbar-brand .navbar-item {
    font-size: 1.25rem;
    margin: 0;
    padding: 0.5rem 1rem;
}

#errorMessage{
    position: fixed; top: 20px;  z-index: 1000;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    padding: 0 1.5rem;
    margin-top: 2rem;
}

/* 卡片样式 */
.card {
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2.5rem;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
}

/* 统一卡片悬停效果 */
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 卡片头部样式 */
.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.card-header-title {
    font-weight: 600;
    font-size: 1.2rem;
    color: #212529;
}

/* 卡片内容样式 */
.card-content {
    padding: 1.5rem;
}

/* 盒子样式优化 */
.box {
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* 标签样式优化 */
.tag {
    border-radius: 4px;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    font-size: 0.85rem;
}

/* 图标样式优化 */
.icon i {
    font-size: 1.1rem;
}

.button i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem 1.5rem;
    border-radius: 16px 16px 0 0;
}

.card-header-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1565C0;
    margin-bottom: 0.25rem;
}

.card-content {
    background-color: #ffffff;
    padding: 1.75rem 1.5rem;
}

/* 按钮样式 */
.button {
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.85rem 1.75rem;
    border: none;
    outline: none;
    position: relative;
    overflow: hidden;
    height: 3.5rem; /* 固定高度，与输入框保持一致 */
    display: inline-flex; /* 确保按钮内内容垂直居中 */
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 按钮悬停效果 */
.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* 按钮点击效果 */
.button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 禁用按钮美化 */
.button:disabled {
    opacity: 0.6;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

/* 输入框美化 */
.input {
    border-radius: 10px;
    font-size: 1rem;
    height: 3.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #dbdbdb;
    padding-left: 1rem;
}

.input:focus {
    border-color: #3273dc;
    box-shadow: 0 0 0 2px rgba(50, 115, 220, 0.25);
    outline: none;
}

.input.is-readonly {
    background-color: #f5f5f5;
    border-color: #e0e0e0;
    color: #4a4a4a;
}

/* 组合字段样式 - 确保按钮和输入框对齐 */
.field.has-addons {
    display: flex;
    align-items: stretch; /* 确保所有子元素高度一致 */
    gap: 0; /* 移除默认间距 */
    margin-bottom: 1.25rem;
}

.field.has-addons .control {
    display: flex;
    align-items: stretch;
}

.field.has-addons .control.is-expanded {
    flex: 1;
}

/* 调整组合字段中的输入框和按钮的圆角 */
.field.has-addons .control:first-child .input,
.field.has-addons .control:first-child .select select {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.field.has-addons .control:last-child .button {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* 确保图标与文本框高度一致 */
.control.has-icons-right .icon.is-right {
    height: 100%;
    align-items: center;
    display: flex;
    justify-content: flex-end;
}

.button:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.button:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: all 0.6s ease;
}

.button:hover::before {
    left: 100%;
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 主按钮样式 */
.button.is-primary {
    background: linear-gradient(135deg, #2196F3 0%, #1565C0 100%);
    border: none;
    color: white;
}

.button.is-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

/* 成功按钮样式 */
.button.is-success {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    border: none;
}

.button.is-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
}

/* 警告按钮样式 */
.button.is-warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    border: none;
}

.button.is-warning:hover:not(:disabled) {
    background: linear-gradient(135deg, #f57c00 0%, #ef6c00 100%);
}

/* 危险按钮样式 */
.button.is-danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    border: none;
}

.button.is-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #d32f2f 0%, #c62828 100%);
}

/* 信息按钮样式 */
.button.is-info {
    background: linear-gradient(135deg, #03a9f4 0%, #0288d1 100%);
    border: none;
}

.button.is-info:hover:not(:disabled) {
    background: linear-gradient(135deg, #0288d1 0%, #0277bd 100%);
}

/* 输入框样式 */
.input {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    font-size: 1rem;
    padding: 0.85rem 1.25rem;
    background-color: white;
}

.input:focus {
    border-color: #2196F3;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.15);
    outline: none;
}

.input.is-readonly {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #495057;
    font-weight: 500;
}

/* 标签样式 */
.tag {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tag:hover {
    transform: scale(1.05);
}

/* 通知样式 */
.notification {
    border-radius: 12px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* 应用消息提示样式 */
.app-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    width: 100%;
    margin: 0;
    padding: 15px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}
#loadingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex; /* 关键：flex 布局 */
  align-items: center; /* 垂直居中 */
  justify-content: center; /* 水平居中 */
}

/* 加载指示器样式 - 使用position和margin实现居中，不使用transform */
#loadingIndicator,
#dataLoadingIndicator {   
    max-width: 400px;
    width: 90%;
    margin: 0;
    margin-top: -50px; /* 近似高度的一半负值 */
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    gap: 10px;
}

/* 管理页面特定样式 */
.card-header-title .icon {
    color: #2196f3;
    margin-right: 10px;
}

.card-header-title {
    display: flex;
    align-items: center;
}

/* 合约状态标签样式 */
#contractStatus.is-paused {
    background-color: #f44336;
    color: white;
}

#contractStatus.is-active {
    background-color: #4caf50;
    color: white;
}

/* 表单验证样式 */
.field.has-error .input {
    border-color: #f44336;
}

.field.has-error .help {
    color: #f44336;
}

/* 管理功能按钮组样式 */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .button-group {
        flex-direction: column;
    }
    
    .button-group .button {
        width: 100%;
    }
    
    .card-header-title {
        font-size: 1rem;
    }
}

/** 加载图标样式 */
.loading-indicator {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-right: 8px;
  vertical-align: middle;
  font-size: 14px;
  line-height: 1;
}

.loading-indicator.is-hidden {
  display: none;
}

.loading-indicator i {
  color: #4a90e2;
  font-size: 14px;
  vertical-align: middle;
}

#walletAddress {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  vertical-align: middle;
  padding: 0 0.75rem;
  word-break: break-all;
  font-size: 0.9rem;
}

#walletInfo {
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar-item .tags.has-addons {
  display: flex;
  align-items: center;
  height: 2.5rem;
  margin: 0;
}

.app-message.success {
    background-color: #f0fff4;
    color: #22543d;
    border-color: #c6f6d5;
}

.app-message.error {
    background-color: #fff5f5;
    color: #c53030;
    border-color: #fed7d7;
}

.app-message.warning {
    background-color: #fffaf0;
    color: #c05621;
    border-color: #fed7aa;
}

.app-message.info {
    background-color: #ebf8ff;
    color: #2b6cb0;
    border-color: #bee3f8;
}

.notification .delete {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 0.25rem;
    transition: all 0.3s ease;
}

.notification .delete:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* 加载指示器动画 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* 标签组样式 */
.tags.has-addons .tag:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.tags.has-addons .tag:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: 0;
}

/* 框样式 */
.box {
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.box h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* 标题样式 */
.title.is-4 {
    color: #2c3e50;
    font-weight: 600;
}

/* 字段样式 */
.field {
    margin-bottom: 1.5rem;
}

.field:last-child {
    margin-bottom: 1rem;
}

.label {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

/* 页脚样式 */

.footer a {
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media screen and (max-width: 1023px) {
    .navbar-menu {
        background: linear-gradient(135deg, #2196F3 0%, #1565C0 100%);
        border-radius: 0 0 12px 12px;
        margin-top: 0.5rem;
    }
    
    .navbar-start,
    .navbar-end {
        padding: 0.5rem 1rem;
    }
    
    .navbar-item {
        margin: 0.25rem 0;
        text-align: center;
    }
    
    .navbar-brand .navbar-item {
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .columns {
        flex-direction: column;
    }
    
    .column {
        margin-bottom: 1rem;
    }
    
    .field.is-grouped {
        flex-direction: column;
    }
    
    .field.is-grouped .control:not(:last-child) {
        margin-bottom: 1rem;
        margin-right: 0;
    }
    
    .button {
        width: 100%;
    }
    
    .navbar-brand .navbar-item {
        font-size: 0.9rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.card,
.notification {
    animation: fadeIn 0.5s ease-out;
}

.navbar-item {
    animation: slideIn 0.3s ease-out;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/*模板*/
[data-bind-if], [data-bind], [data-bind-for] > * {
    display: none !important;
}

/* 打印样式 */
@media print {
    body {
        background: white;
    }
    
    .navbar,
    .button,
    .notification {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}