/* --- Font Faces --- */
@font-face {
    font-family: 'Nunito';
    src: url('/assets/fonts/Nunito-Regular.woff2') format('woff2');
    font-weight: 400;
}
@font-face {
    font-family: 'Nunito';
    src: url('/assets/fonts/Nunito-Medium.woff2') format('woff2');
    font-weight: 500;
}
@font-face {
    font-family: 'JetBrains Mono';
    src: url('/assets/fonts/JetBrainsMono-Regular.woff2') format('woff2');
    font-weight: 400;
}

/* --- Base Layout & Card --- */
* { box-sizing: border-box; }
body {
    font-family: 'Nunito', sans-serif;
    color: #5F7482;
    background: #F1F1F1;
    margin: 0;
}
.page-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}
.card {
    background: #FFFFFF;
    max-width: 680px;
    width: 100%;
    padding: 2rem;
    border-radius: 36px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* --- Card Content --- */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.jsc-logo { height: 36px; width: 36px; }
.language-section { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.divider {
    border: none;
    border-top: 1px solid #E5E7EB;
    margin: 1.5rem 0;
}
.main-heading {
    font-size: 2.25rem;
    font-weight: 500;
    color: #5F7482;
    margin-bottom: 1.5rem;
    text-align: left;
    line-height: 1.3;
}
.value, #powfaucet .status-value, #powfaucet .pow-status-addr .status-value {
     font-family: 'JetBrains Mono', monospace;
     color: #5F7482;
     word-wrap: break-word;
}
#powfaucet .page-claim .col { /* Add claim page .col to the font rule */
    font-family: 'JetBrains Mono', monospace;
    color: #5F7482;
    word-wrap: break-word;
}
.static-info h3 {
  font-weight: 500;
  color: #4A5D68;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.static-info p {
    line-height: 1.6;
    margin: 0;
}

/* --- FAUCET OVERRIDES --- */
#powfaucet .faucet-page,
#powfaucet .faucet-bootstrap {
    width: 100%;
    max-width: 100%;
    box-shadow: none;
    background-color: transparent;
    padding: 0;
    margin: 0;
}
#powfaucet .faucet-title,
#powfaucet .faucet-frontimage,
#powfaucet .faucet-description,
#powfaucet .pow-status-image {
    display: none !important;
}
#powfaucet .faucet-inputs,
#powfaucet .faucet-actions {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
}
#powfaucet .form-control {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: #5F7482;
    width: 100%;
    margin-bottom: 1rem;
}

/* --- BUTTON STYLES --- */
#powfaucet .faucet-actions button,
#powfaucet .action-btn {
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}
#powfaucet button.start-action {
    background: #31EDC4;
    color: #5F7482;
}
#powfaucet button.start-action:hover {
    background: #2BD4AD;
    transform: translateY(-1px);
}
#powfaucet button.stop-action {
    background: #ED6554;
    color: white;
}
#powfaucet button.action-btn.btn-secondary {
    background-color: #4A5D68;
    color: white;
    font-weight: 500;
}

/* --- HIDE STATIC INFO --- */
.faucet-bootstrap:has(.page-mining) + .divider,
.faucet-bootstrap:has(.page-mining) + .divider + .static-info,
.faucet-bootstrap:has(.page-claim) + .divider,
.faucet-bootstrap:has(.page-claim) + .divider + .static-info {
    display: none;
}

/* --- MINING PAGE OVERRIDES --- */
#powfaucet .pow-status {
    border: none;
    padding: 0;
    margin-bottom: 1.5rem;
}
#powfaucet .pow-status-addr {
    margin-bottom: 1.5rem;
}
#powfaucet .pow-status-addr .col-12 {
    padding-left: 1.5rem !important;
}
#powfaucet .pow-status .status-title {
    font-weight: 500;
    color: #4A5D68;
    margin-bottom: 0.25rem;
}
#powfaucet .pow-status-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid #E5E7EB;
    background-color: #F9FAFB;
    border-radius: 12px;
}
#powfaucet .pow-status-top .status-title {
    text-align: left;
}
#powfaucet .pow-status-top .status-value {
    font-size: 1.75rem;
    font-weight: 500;
    text-align: left;
}
#powfaucet .pow-status-other {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.75rem 0;
    padding: 0 1.5rem;
}
#powfaucet .pow-status .row > [class*="col-"] {
    flex: none;
    width: auto;
    max-width: none;
    padding: 0;
}
#powfaucet .pow-status-other .status-title {
    font-weight: 400;
    text-align: left;
}
#powfaucet .pow-status-other .status-value {
    text-align: right;
}
#powfaucet .pow-status-other .col-3, #powfaucet .pow-status-other .col-6:last-child {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
}
#powfaucet .pow-worker-controls button {
    background: #5F7482;
    border: none;
    border-radius: 50%;
    color: white;
    width: 24px;
    height: 24px;
    line-height: 24px;
    padding: 0;
    font-size: 16px;
}

/* --- CLAIM PAGE OVERRIDES --- */
#powfaucet .page-claim .container {
  width: 100%;
  padding: 0;
}
#powfaucet .page-claim .row {
    display: block;
    margin-bottom: 1rem;
}
#powfaucet .page-claim .col-3 { /* Label */
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    color: #4A5D68;
    margin-bottom: 0.25rem;
    width: 100%;
}
#powfaucet .page-claim .row { /* Value Box */
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    width: 100%;
    max-width: 100%;
}
#powfaucet .page-claim .row:has(.faucet-actions) {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
}
/* Specifically target the title row and its column to remove the styling */
#powfaucet .page-claim .container > .row:first-child,
#powfaucet .page-claim .container > .row:first-child > .col {
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 0;
}
/* Style the H5 title */
#powfaucet .page-claim h5 {
    font-family: 'Nunito', sans-serif;
    font-size: 1.2rem;
    font-weight: 500;
    color: #4A5D68;
    margin: 0;
    margin-bottom: 1.5rem;
}
#powfaucet .page-claim button.start-action {
    margin-top: 1.5rem;
}

/* --- CLAIM STATUS SECTION (Processing, Success, Fail) --- */
#powfaucet .claim-status .alert-primary {
    background: transparent;
    border: none;
    padding: 1rem 0;
    color: #5F7482;
    text-align: center;
}
#powfaucet .claim-status .alert-success {
    background-color: #F0FFF4;
    border: 1px solid #C6F6D5;
    color: #38A169;
    padding: 1rem;
    padding-left: 3rem;
    position: relative;
    border-radius: 8px;
    margin-top: 1.5rem;
}
#powfaucet .claim-status .alert-success::before {
    content: '✓';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    font-size: 1.2rem;
    color: #38A169;
}
#powfaucet .claim-status .alert-success .txhash a {
    color: #2C7A7B;
    text-decoration: underline;
}
#powfaucet .result-sharing {
    display: none;
}
/* This empty column appears on the claimed page. Hide its background. */
#powfaucet .page-claim .row > .col:empty {
    background: none;
    border: none;
    padding: 0;
}
/* This targets the row containing the "Return to startpage" button */
#powfaucet .page-claim .row:has(button.action-btn) {
    margin-top: 1.5rem;
    background: none;
    border: none;
    border-radius: 0;
    padding: 0;
}
/* This makes the button's column take up the full width */
#powfaucet .page-claim .row > .col-4 {
    width: 100%;
    max-width: 100%;
    padding: 0;
}

/* --- GENERAL MANUAL FIXES --- */
#powfaucet .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
