/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Modify the base body style */
body {
    background-color: #0A0A0A;
    color: #FFFFFF;
    font-family: "IBM Plex Mono", monospace;
    font-weight: 100;
    font-style: normal;
    line-height: 1.5;
    padding: 0 5%;  /* Add 5% padding on left and right */
}

a {
    color: #00ff00;
}

a:visited{
    color: #00ff00;
}

/* Update the container and width constraints */
.container {
    width: 100%;  /* Allow full width */
    margin: 0 auto;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: #0A0A0A;
}

.hero h1 {
    font-size: clamp(2rem, 25vw, 12rem);
    font-weight: 700;
    text-align: center;
    line-height: 0.9;
    letter-spacing: -0.02em;
}

/* Manifesto Section */
.manifesto {
    padding: 4rem 2rem;
    background: #0A0A0A;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
}

.manifesto-content {
    width: 100%;
    max-width: none;  /* Remove max-width constraint */
    margin: 0 auto;
}

.manifesto p {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Inscription Section */
.inscription-section {
    padding: 8rem 2rem;
    padding-top: 2rem;
    background: #0A0A0A;
}

.inscription-wrapper {
    width: 100%;  /* Allow full width */
    margin: 0 auto;
}

.group {
    margin-bottom: 2rem;
}

.group-small {
    max-width:600px;
}

/* Panel styling */
.panel {
    border: none;
    padding: 2rem;
    padding-left: none;
}

.panel-fees {
    background: transparent;
    border: none;
    padding: 2rem;
    padding-left: none;
    font-size: smaller;
}

.panel-return {
    padding-left: 2rem;
}

/* Wallet Button */
.wallet-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    color: inherit;
    border: none;
    cursor: pointer;
    font-family: "IBM Plex Mono", monospace;
    font-size: 2rem;
    padding: 0;
    opacity: 0;
    transition: all 1s ease;
}

#walletText {
    /* text-decoration: line-through; */
    text-transform: uppercase;
    color: #00ff00;
}

.wallet-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.wallet-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #333;
    transition: background-color 0.3s;
}

.wallet-connected .wallet-indicator {
    background-color: #00FF00;
}

/* Form Elements */
.label {
    display: block;
    color: #888;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
}

.input {
    width: 100%;
    background: #0A0A0A;
    border: 1px solid #333;
    padding: 1rem;
    color: #FFF;
    font-family: "IBM Plex Mono", monospace;
    font-size: 1rem;
}

.input:focus {
    outline: none;
    border-color: #00FF00;
}

/* Content Display */
.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.content-display {
    background: #0A0A0A;
    padding: 1rem;
    border: 1px solid #333;
    font-family: "IBM Plex Mono", monospace;
    color: #00FF00;
}

/* Fee Display */
.fees {
    display: flex;
    flex-direction: column;
    font-weight: 300;
    gap: 1rem;
}

.fee-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fee-label {
    color: #888;
}

.fee-value {
    font-family: "IBM Plex Mono", monospace;
    color: #00FF00;
}

/* Buttons */
.inscribe-btn, .refresh-btn {
    width: 100%;
    background: #151515;
    color: #FFF;
    border: 1px solid #333;
    padding: 1rem;
    font-family: "IBM Plex Mono", monospace;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.inscribe-btn:not(:disabled):hover,
.refresh-btn:hover {
    background: #00FF00;
    color: #0A0A0A;
}

.inscribe-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Gallery Section */
.gallery {
    padding: 8rem 2rem;
    background: #0A0A0A;
    border-top: 1px solid #333;
}

.gallery-grid-parent {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    width: 100%;
    margin: 0 auto;
}

.gallery-grid-child {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
    margin: 0 auto;
}

.gallery-item {
    aspect-ratio: 1;
    background: #151515;
    border: 1px solid #333;
    overflow: hidden !important;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-2px);
}

.gallery-item.selected {
    border: 2px solid #00FF00;
}

.gallery-item.selected::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid #00FF00;
    pointer-events: none;
}

/* Show elements on hover */
.gallery-item:hover .inscription-number,
.gallery-item:hover .external-link,
.gallery-item:hover .inscription-level {
    opacity: 1;
}

iframe {
    overflow: hidden;
}

.iframe-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #151515, #1a1a1a);
}

/* Alert Dialog */
.alert {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.alert.visible {
    display: flex;
}

.alert-content {
    background: #151515;
    border: 1px solid #333;
    padding: 2rem;
    max-width: 80%;
    width: fit-content;
    font-size: 1em;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.alert-title {
    color: #FFF;
    font-weight: 500;
    font-size: 1.5em;
}

.button-group {
    display: flex;
    gap: 1rem;
}

.alert-message {
    color: #888;
    margin-bottom: 2rem;
}

.alert-note{
    font-size: 1.5rem;
    color: #00ff00;
    line-height: 2;
}

.alert-btn {
    float: right;
    background: #0A0A0A;
    color: #FFF;
    border: 1px solid #333;
    padding: 1.25rem 1.5rem;
    font-family: "IBM Plex Mono", monospace;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.5em;
    margin: 0.25rem;
}

.alert-btn:hover {
    background: #00FF00;
    color: #0A0A0A;
}

/* Enhanced Alert Styles */
.status-message {
    background: transparent;
    border: none;
    font-family: "IBM Plex Mono", monospace;
    font-size: 2.275rem;
    line-height: 1.5;
}

.status-message2 {
    margin-top: 0.5rem;
    font-size: smaller;
    color: #00FF00;
}

.status-pending {
    border-left: 4px solid #3498db;
    color: #888;
}

.status-success {
    border-left: 4px solid #00FF00;
    color: #00FF00;
}

.status-error {
    border-left: 4px solid #e74c3c;
    color: #e74c3c;
}

.status-message a {
    color: inherit;
    text-decoration: none;
}

.status-message a:hover {
    text-decoration: underline;
}

/* Push Against The Wall Text */
.inscribe-text {
    font-family: "IBM Plex Mono", monospace;
    font-size: 4em;
    font-weight: 500;
    color: #FFF;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    margin: 0;
    user-select: none;
}

.inscribe-text:not([disabled]):hover {
    color: #00FF00;
}

.inscribe-text:active:not([disabled]) {
    transform: scale(0.98);
}

.inscribe-text[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Refresh Icon */
.refresh-icon {
    position: absolute;
    top: 1rem;
    right: 0rem;
    cursor: pointer;
    color: #888;
    transition: all 0.3s;
}

.refresh-icon:hover {
    color: #00FF00;
    transform: rotate(180deg);
}

.refresh-icon:active {
    transform: scale(0.9) rotate(180deg);
}

/* Animation keyframes */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes colorFade {
    0% { filter: invert(0%); }
    50% { filter: invert(100%); }
    100% { filter: invert(0%); }
}

/* Title container */
.title-container {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    bottom: -0.8rem;
    background: transparent;
    z-index: 10;
    display: none;
}

.title-text {
    font-size: 4rem;
    font-weight: 300;
    text-shadow: 0 0 2px black;
    margin-left: 10px;
}

.title-container.portrait {
    padding: 0rem;
    bottom: 10px;
    left: 5px;
    width: 95%;
}

/* Spinner */
.spinner {
    width: 3.5rem;
    height: 3.5rem;
    margin-left:10px;
    border: 0.2em solid #333;
    border-top: 0.2em solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.spinner.portrait {
    position: fixed;
    top: 40%;
    left: 40%;
    margin-left:0px;
    transform: translate(-50%, -50%);
}

/* Transaction History Styles */
#transactionHistory {
    margin-top: 2rem;
}

.history-header {
    font-size: 6.0rem;
    margin-bottom: 0rem;
    font-weight: 100;
    color: #FFF;
}

/* History Table */
.history-table {
    width: 100%;
    margin-bottom: 2rem;
    font-family: "IBM Plex Mono", monospace;
    border-spacing: 0;
}

.history-row {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #333;
}

.history-row.header {
    color: #888;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    padding-bottom: 0.5rem;
}

.history-cell {
    padding: 0 0.5rem;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
}

.history-cell::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 20px; /* Width of the fade effect */
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none; /* Allow clicks to pass through */
}

.history-cell.date {
    width: 15%;
}

.history-cell.type {
    width: 10%;
}

.history-cell.status {
    width: 15%;
    display: flex;
    align-items: center;
}

.history-cell.id {
    width: 30%;
}

.history-cell.commit-tx {
    width: 25%;
}

.history-cell.reveal-tx {
    width: 25%;
}

.history-cell.actions {
    width: 15%;
    text-align: right;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-complete {
    background-color: rgba(0, 255, 0, 0.2);
    color: #00FF00;
}

.status-failed, .status-reveal_failed, .status-commit_not_found, .status-reveal_not_found {
    background-color: rgba(255, 0, 0, 0.2);
    color: #ff6b6b;
}

.status-initializing, .status-signing_commit, .status-commit_signed, .status-reveal_signed, 
.status-commit_broadcast, .status-commit_confirmed, .status-reveal_broadcast, 
.status-reveal_pending, .status-commit_pending, .status-pending {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

/* Transaction spinner */
.tx-spinner {
    width: 16px;
    min-width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    margin-left: 8px;
    animation: tx-spin 1s linear infinite;
}

@keyframes tx-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Action Buttons */
.history-btn {
    background: #151515;
    color: #FFF;
    border: 1px solid #333;
    padding: 0.5rem 0.75rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 0.5rem;
}

.history-btn:hover {
    background: #00FF00;
    color: #0A0A0A;
}

.history-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.history-btn.retry-btn {
    margin-right: 0.5rem;
}

.history-success-icon {
    color: #00FF00;
    font-weight: bold;
    margin-left: 0.5rem;
}

/* Empty and Error States */
.history-empty, .history-error {
    padding: 2rem 0.5rem;
    text-align: left;
    color: #888;
}

.history-error {
    color: #ff6b6b;
}

/* Transaction links */
.history-cell a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

.history-cell a:hover {
    color: #00FF00;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .history-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 0;
    }
    
    .history-cell {
        width: 100% !important;
        padding: 0.25rem 0;
    }
    
    .history-row.header {
        display: none;
    }
    
    .history-cell::before {
        content: attr(data-label);
        display: inline-block;
        width: 100px;
        color: #888;
        font-size: 0.75rem;
    }
    
    .history-cell.actions {
        text-align: left;
        margin-top: 0.5rem;
    }
}

/* Styles for the fee rate input */
.fee-input-wrapper {
    display: flex;
    align-items: center;
}

.fee-rate-input {
    background: transparent;
    border: none; 
    border-bottom: 1px solid #00FF00;
    color: #00FF00;
    font-family: "IBM Plex Mono", monospace;
    font-size: 2rem;
    width: 40px;
    padding: 0;
    margin-right: 4px;
    text-align: right;
}

.fee-rate-input:focus {
    outline: none;
}

.fee-unit {
    color: #00FF00;
}

/* Additional styles for eligibility and return wall features */
.eligibility-status {
    font-size: 2rem;
}

.eligibility-status.eligible {
    color: #00FF00;
}

.eligibility-status.not-eligible {
    color: #ff6b6b;
}

.child-count-info {
    font-size: 1.5rem;
    color: #888;
    margin-left: 25px;
}

/* Return Wall Controls */
.return-wall-controls {
    /* padding: 0rem 0; */
}

.return-wall-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.return-wall-checkbox {
    width: 18px;
    height: 18px;
    background: #0A0A0A;
    border: 1px solid #333;
    cursor: pointer;
}

.return-wall-label {
    font-size: 2rem;
    color: #FFF;
}

.return-wall-group {
    width: 100%;
}

.return-option-buttons {
    display: flex;
    gap: 1rem;
}

.return-option-btn {
    background: #151515;
    color: #FFF;
    border: 1px solid #333;
    padding: 0.5rem 1rem;
    font-family: "IBM Plex Mono", monospace;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 5rem;
    text-align: center;
}

.return-option-btn.active {
    background: #00FF00;
    color: #0A0A0A;
    border-color: #00FF00;
}

.level-input-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.level-label {
    font-size: 2rem;
    color: #888;
}

.level-input {
    width: 60px;
    background: #0A0A0A;
    border: 1px solid #333;
    padding: 0.5rem;
    color: #FFF;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.875rem;
}

.level-input:focus {
    outline: none;
    border-color: #00FF00;
}

.max-level-info {
    color: #888;
    font-size: 0.75rem;
}

/* Inscription displays */
.inscription-number {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #00FF00;
    padding: 4px 8px;
    border-radius: 3px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.75rem;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.inscription-level {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #00FF00;
    padding: 4px 8px;
    border-radius: 3px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 1rem;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* External link icon */
.external-link {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: all 0.2s ease;
    opacity: 0;
}

.external-link:hover {
    background-color: #00FF00;
    color: #0A0A0A;
}

/* Hide the spinner buttons for all browsers */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}

/* For Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.footer {
    position: fixed;
    font-size: 1rem;
    bottom: 0;
    right: 0;
    width: 100%;
    text-align: right;
    padding-right: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
}

.down-arrow {
    width: 36px;
    height: 36px;
    position: absolute;
    right: 10px;
    display: none;
}

.gallery-heading-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  
  .gallery-title {
    font-size: 3rem;
    font-weight: 300;
  }
  
  .toggle-mode-btn {
    background: transparent;
    color: #00FF00;
    /* margin-left: 10rem; */
    /* border: 1px solid #333; */
    padding: 0.5rem 1rem;
    font-family: "IBM Plex Mono", monospace;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-weight: 200;
    font-size:3rem;
  }
  
  .toggle-mode-btn:hover {
    background: #00FF00;
    color: #0A0A0A;
  }

  .toggle-mode-btn.countdown-active {
    opacity: 0.7;
    cursor: not-allowed;
    border-color: #444;
    animation: pulse 2s infinite;
  }
  
  @keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
  }
  
  .toggle-mode-btn.countdown-active:hover {
    background: transparent;
    color: #FFF;
  }

  .no-wallet-message-detail{
    font-size:1.5rem;
  }

  .ok-btn{
    float: right;
    background: #0A0A0A;
    color: #FFF;
    border: 1px solid #333;
    padding: 0.75rem 0.75rem;
    font-family: "IBM Plex Mono", monospace;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1em;
    margin: 0.25rem;
  }