:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --text-color: #c9d1d9;
    --primary-color: #58a6ff;
    --primary-logo-color: #a4c9ff; 
    --primary-hover: #1f6feb;
    --accent-color: #8957e5;
    --border-color: #30363d;
    --success-color: #238636;
    --error-color: #da3633;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Navigation Variables */
:root {
    --nav-bg: rgba(5, 7, 10, 0.8);
    --border-subtle: rgba(255, 255, 255, 0.05);
}

.container-wide {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: #a4c9ff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    /* gap: 1.5rem; */
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

.nav-links a:hover, .nav-links a.active {
    /* background-color: var(--border-color); */
    color: var(--primary-logo-color);
}

.nav-links .nav-link-tight {
    text-align: center;
    line-height: 1.25;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    width: auto;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.btn-connect {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-connect:hover {
    background-color: var(--primary-hover);
}

/* Container */
.container {
    max-width: 800px;
    margin: 100px auto;
    padding: 0 20px;
}

/* Typography */
h1 {
    color: #fff;
    font-size: 2.2rem;
    margin-bottom: 10px;
    text-align: center;
}

h2 {
    color: #fff;
    font-size: 1.5rem;
    margin-top: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

p {
    color: #8b949e;
    text-align: center;
    margin-bottom: 30px;
}

p.text-left {
    text-align: left;
}

/* Cards & Forms */
form, .card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff;
}

#password-container {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 20px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 20px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
}

input[type="file"] {
    padding: 7px;
}

button {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--primary-hover);
}

/* Results Areas */
#result, #explore-result, #peers-result, #validators-result, #auth-result, #verify-result {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-family: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin-top: 20px;
    color: var(--text-color);
    max-height: 400px !important;
    /* overflow-y: auto; */
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--primary-color);
    font-weight: 600;
}

tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Tabs */
.tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    gap: 10px;
    padding-left: 15px;
}

.tab-btn {
   /* background-color: var(--card-bg);
    border: 1px solid var(--border-color); */
    background: none;
    border: none;
    color: var(--text-color);
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    width: auto;
    white-space: nowrap;
}

.tab-btn:hover {
    background-color: var(--card-bg);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--border-color);
    color: var(--text-color);
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    margin-left: 5px;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 250px;
    background-color: #000;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -125px;
    opacity: 0;
    transition: opacity 0.3s;
    font-weight: normal;
    font-size: 12px;
    line-height: 1.4;
    border: 1px solid var(--border-color);
    pointer-events: none;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--border-color) transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}


/* Drag and Drop Zone */
.drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    color: #ccc;
    font-size: 0.95em;
}

.drop-zone:hover, .drop-zone.dragover {
    border-color: var(--secondary-color);
    background: rgba(0, 75, 255, 0.05);
    color: white;
}

/* how it works */

.guide-section h2 {
    text-align: center;
}

.faq-item {

    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .btn-connect {
        display: none;
    }
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--card-bg);
        border-bottom: 1px solid var(--border-color);
        padding: 15px 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        gap: 10px;
        align-items: center;
    }

    .nav-links.show {
        display: flex;
    }
    
    .container {
        margin: 100px auto;
    }
    
    h1 {
        font-size: 1.8rem;
    }

    #explore-result {
        max-height: 300px !important;
    }

    .tabs {
        justify-content: space-evenly;
    }
}

/* Home Page Specific Styles */
.full-width-section {
    width: 100%;
    padding: 80px 0;
    display: flex;
    justify-content: center;
    
}

.full-width-section .container {
    margin: 0;
    max-width: 1100px;
    width: 100%;
    padding: 0 40px;    
}

.bg-dark {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.bg-white {
    background-color: #ffffff;
    color: #161b22;
}

.bg-white p {
    color: #444c56;
}

.text-wheat {
    color: #ead068;
}

.bg-white .text-wheat {
    color: #d1b033; /* Slightly darker for better contrast on white */
}

.text-dark {
    color: #161b22;
    font-weight: 700;
}

.highlight-text {
    color: var(--primary-color);
    font-weight: 600;
}

.underline-wheat {
    display: inline-block;
    position: relative;
}

.underline-wheat::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    bottom: -5px;
    left: 0;
    background-color: #ead068;
    border-radius: 2px;
}

.bg-white .underline-wheat::after {
    background-color: #d1b033;
}

.hero-bg{

    background-color: var(--bg-color);
    /* background: linear-gradient(180deg,rgba(13, 17, 23, 1) 0%, rgba(4, 4, 38) 50%, rgba(13, 17, 23, 1) 100%); */
    background: linear-gradient(180deg,rgba(13, 17, 23, 1) 0%, rgba(20, 20, 37) 50%, rgba(13, 17, 23, 1) 100%);
}

.hero-section {
    text-align: center;
    padding: 40px 20px;
    
}

.hero-title {
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #8b949e;
    max-width: 700px;
    margin: 0 auto 40px auto;
}

/* .maat-eco{
    background-color: #d6dde4;   
} */

.ecosystem-title {
    font-size: 2.5rem;
    border-bottom: none !important;
    margin-bottom: 10px;
}

.large-subtitle {
    font-size: 1.5rem !important;
    line-height: 1.4;
    max-width: 900px;
    margin-bottom: 60px;
}

.feature-text-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 60px 40px;
    margin-top: 40px;
}

.feature-item {
    flex: 1 1 calc(50% - 40px); /* Flexbox 2-column layout */
    min-width: 300px;
}

.feature-item h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(234, 208, 104, 0.2);
    display: inline-block;
    padding-bottom: 5px;
}

.feature-item p {
    font-size: 1.1rem;
    line-height: 1.7;
    text-align: left;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    text-align: left;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bg-white .feature-card {
    background-color: #f6f8fa;
    border: 1px solid #d0d7de;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.feature-card h3 {
    margin-top: 0;
    font-size: 1.4rem;
}

.feature-card p {
    text-align: left;
    margin-bottom: 0;
}

.btn-blue {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff !important;
    text-decoration: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-blue:hover {
    background-color: var(--primary-hover);
}

.cta-section {
    text-align: center;
    padding: 60px 20px;
    border-top: 1px solid var(--border-color);
}

/* Desktop Home Page Overrides */
@media (min-width: 769px) {
    .hero-section {
        text-align: left;
        padding: 120px 20px;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-title {
        font-size: 4.5rem;
        margin-bottom: 30px;
        line-height: 1.1;
        /* color: #ead068; */
        color: #000;
    }

    .hero-subtitle {
        font-size: 1.4rem;
        margin: 0 0 40px 0;
        max-width: 800px;
        text-align: left;
    }

    .features-header {
        text-align: left;
    }

    .features-subtitle {
        margin: 0 0 40px 0;
        text-align: left;
        max-width: 800px;
    }

    .cta-section {
        text-align: left;
        padding: 80px 20px;
    }

    .cta-content {
        max-width: 800px;
    }
}

/* Developer Section Features */
.developer-feature-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 32px;
}

.developer-feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 4px;
    background-color: #272a31;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.developer-feature-icon .material-symbols-outlined.primary {
    color: #adc6ff;
}

.developer-feature-icon .material-symbols-outlined.secondary {
    color: #e9c349;
}

.developer-feature-text h5 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
    margin-top: 0;
}

.developer-feature-text p {
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Inter', sans-serif;
    text-align: left;
    margin: 0;
    line-height: 1.6;
}

/* Sovereign Economy Dashboard Styles */
.economy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 40px;
}

.economy-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 10px;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
    overflow: hidden;
}

.economy-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.economy-card h4 {
    margin: 0 0 10px 0;
    font-size: 0.9rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.economy-card .balance {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Space Grotesk', sans-serif;
}

.economy-card .percentage {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-top: 5px;
}

.economy-card i {
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 4rem;
    opacity: 0.05;
    color: var(--primary-color);
}

.governance-section {
    margin-top: 40px;
}

.proposal-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.proposal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.proposal-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-pending { background: rgba(233, 195, 73, 0.1); color: #e9c349; border: 1px solid rgba(233, 195, 73, 0.3); }
.status-approved { background: rgba(35, 134, 54, 0.1); color: #3fb950; border: 1px solid rgba(35, 134, 54, 0.3); }
.status-rejected { background: rgba(218, 54, 51, 0.1); color: #f85149; border: 1px solid rgba(218, 54, 51, 0.3); }

/* Explorer Search Bar Styles */
.explorer-search-card {
    margin-bottom: 30px;
    text-align: center;
}

.explorer-search-form {
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.explorer-search-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.explorer-search-input {
    margin-bottom: 0 !important;
    flex-grow: 1;
}

.explorer-search-btn {
    width: auto !important;
    min-width: 120px;
    padding: 10px 20px;
}

.explorer-search-result {
    margin-top: 20px;
    text-align: left;
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    word-break: break-word;
}

.search-result-close-btn {
    display: block;
    margin-left: auto;
    background: white;
    color: var(--bg-color);
    width: unset;
    padding: 2px 8px;
}


.search-result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.search-result-hash {
    font-family: monospace;
    word-break: break-all;
}

.search-result-owner-address {
    font-size: 0.8em;
    word-break: break-all;
    opacity: 0.7;
}

.search-result-premium-auth {
    color: var(--secondary-color);
    font-weight: bold;
}

.search-result-owner-details {
    word-break: break-all;
}

.search-result-owner-name {
    font-size: 0.85em;
    opacity: 0.8;
}

.search-result-pre-data {
    font-size: 0.8em;
    margin-top: 5px;
    white-space: pre-wrap;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 4px;
}