*, *:before, *:after {
    box-sizing: border-box;
}

html {
    /* Prevent font scaling in landscape mode */
    -webkit-text-size-adjust: 100%;
    /* Fix for 100vh on mobile Safari */
    height: -webkit-fill-available;
}

:root {
    --background-color: #0a0a1a;
    --primary-text-color: #e0e0e0;
    --secondary-text-color: #a0a0c0;
    --accent-color: #00aaff;
    --card-background: #1a1a2a;
    --border-color: #2a2a4a;
}

body {
    background-color: var(--background-color);
    color: var(--primary-text-color);
    font-family: 'Inter', sans-serif;
    margin: 0;
    /* Basic padding */
    padding: 20px;
    /* Add safe area padding for iOS devices with notches */
    padding-top: env(safe-area-inset-top, 20px);
    padding-bottom: env(safe-area-inset-bottom, 20px);
    padding-left: env(safe-area-inset-left, 20px);
    padding-right: env(safe-area-inset-right, 20px);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* Fix for 100vh on mobile Safari */
    min-height: -webkit-fill-available;
}

/* Reset default iOS styles for form elements */
button,
input,
select,
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.container {
    max-width: 900px;
    width: 100%;
}

h1, h2, h3, h4 {
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffffff;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
    gap: 20px;
    position: relative;
}



.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
    border-radius: 12px;
    padding: 5px;
    flex-shrink: 0;
}

.logo:hover {
    transform: scale(1.05);
    background-color: rgba(0, 123, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.logo:hover img {
    opacity: 1;
}


.logo h1 {
    font-size: 1.5em;
    margin: 0;
}

/* Main Navigation */
.main-nav {
    display: flex;
    justify-content: space-around;
    flex-grow: 1;
    gap: 15px;
}

.main-nav a {
    color: var(--secondary-text-color);
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: #ffffff;
    background-color: var(--card-background);
}

.main-nav a.highlighted {
    background-color: var(--accent-color);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.5);
    transform: scale(1.05);
}

.main-nav a.highlighted:hover {
    box-shadow: 0 0 25px rgba(0, 170, 255, 0.8);
    transform: scale(1.1);
}

.nav-toggle {
    display: none;
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--primary-text-color);
    border-radius: 9px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.nav-toggle span:nth-child(1) {
    top: 0px;
}

.nav-toggle span:nth-child(2) {
    top: 9px;
}

.nav-toggle span:nth-child(3) {
    top: 18px;
}

.nav-open .nav-toggle span:nth-child(1) {
    top: 9px;
    transform: rotate(135deg);
}

.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.nav-open .nav-toggle span:nth-child(3) {
    top: 9px;
    transform: rotate(-135deg);
}


main > section {
    margin-bottom: 60px;
}

.hero {
    text-align: center;
    margin-bottom: 80px;
}

.hero h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    background: -webkit-linear-gradient(45deg, #00aaff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1em;
    color: var(--secondary-text-color);
    max-width: 600px;
    margin: 0 auto 30px;
}

.cta-button {
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.5);
}

.cta-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 170, 255, 0.8);
    color: #fff;
}

main > section > h3 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 40px;
}

.card {
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    font-size: 1.1em;
    line-height: 1.6;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-item {
    background-color: var(--card-background);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.feature-item h4 {
    margin-top: 0;
    font-size: 1.2em;
    color: var(--accent-color);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.step {
    background-color: var(--card-background);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 25px;
}

.step-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2em;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
}

.step h4 {
    margin: 0 0 5px 0;
}

.step p {
    margin: 0;
    color: var(--secondary-text-color);
    line-height: 1.5;
}

footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
    font-size: 0.9em;
    color: var(--secondary-text-color);
}

.comparison-table {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 40px 0;
}

.table-column h4 {
    text-align: center;
    color: var(--accent-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.table-column ul {
    list-style: none;
    padding: 0;
}

.table-column li {
    background-color: var(--card-background);
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 8px;
    border-left: 5px solid;
    text-align: left;
}

.table-column li.plus {
    border-left-color: #28a745; /* Green for plus */
}

.table-column li.minus {
    border-left-color: #dc3545; /* Red for minus */
}


@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    header {
        flex-wrap: wrap;
        justify-content: space-between;
    }
    .logo {
        order: 1;
    }
    .nav-toggle {
        display: block;
        order: 2;
    }
    .main-nav {
        flex-direction: column;
        width: 100%;
        order: 3;
        margin-top: 20px;
        gap: 10px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
    .nav-open .main-nav {
        max-height: 500px; /* Adjust as needed */
    }
    .main-nav a {
        margin: 0;
        text-align: center;
        padding: 12px;
    }
    .hero h2 {
        font-size: 2em;
    }
    main > section > h3 {
        font-size: 1.7em;
    }
    .card {
        padding: 20px;
    }
    .step {
        flex-direction: column;
        text-align: center;
    }
    .comparison-table {
        grid-template-columns: 1fr;
    }
    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
    .contract-item {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .address-group {
        width: 100%;
        display: flex;
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center items */
        gap: 10px; /* Add some space between address and button */
    }
    .stats-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .stats-row span:last-child {
        align-self: flex-end;
    }
    .custom-table {
        overflow-x: auto;
        display: block;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.8em;
    }
    main > section > h3 {
        font-size: 1.5em;
    }
    .logo img {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }
    .logo h1 {
        font-size: 1.2em;
    }
    .cta-button {
        padding: 12px 25px;
        font-size: 0.9em;
    }
    .step-number {
        font-size: 1.5em;
        min-width: 40px;
        height: 40px;
    }
}

.footer-links {
    margin-top: 20px;
}

.footer-links a {
    margin: 0 15px;
    color: var(--secondary-text-color);
}

.footer-links a:hover {
    color: var(--accent-color);
}



.footer-disclosure {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    text-align: left;
}

.footer-disclosure h4 {
    text-align: center;
    margin-top: 0;
    color: var(--accent-color);
}

.footer-disclosure p {
    font-size: 0.9em;
    line-height: 1.5;
    color: var(--secondary-text-color);
}

.footer-disclosure p strong {
    color: var(--primary-text-color);
}

.notice {
    background-color: rgba(255, 180, 0, 0.1);
    border-left: 5px solid #ffb400;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    font-size: 0.95em;
    text-align: left;
}

.contract-list {
    margin-top: 20px;
    text-align: left;
}

.contract-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--background-color);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--border-color);
}

.contract-item span:first-child {
    font-weight: 600;
}

.address {
    font-family: monospace;
    background-color: var(--card-background);
    padding: 5px 10px;
    border-radius: 5px;
    color: var(--accent-color);
    font-size: 0.9em;
    word-break: break-all;
}

.additional-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.additional-links .cta-button {
    margin: 0; /* Remove old margin */
}



.stats-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    text-align: left;
}

.stats-row {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.stats-row:last-child {
    border-bottom: none;
}

.stats-header {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.1em;
    background-color: var(--background-color);
    border-radius: 8px 8px 0 0;
}

.stats-row span:last-child {
    font-weight: 600;
}

.network-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.network-list li {
    background-color: var(--background-color);
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-weight: 600;
}

/* Custom Table Styles */
.custom-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden; /* To keep border-radius */
}

.custom-table th, .custom-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.custom-table thead th {
    font-family: 'Orbitron', sans-serif;
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.1em;
    background-color: var(--background-color);
}

.custom-table tbody tr:last-child th,
.custom-table tbody tr:last-child td {
    border-bottom: none;
}

.custom-table tbody tr:hover {
    background-color: #2a2a4a;
}

/* Highlighted CTA Button */
.cta-button.highlighted-cta {
    background-color: #f7a700; /* A different, bright color */
    box-shadow: 0 0 20px rgba(247, 167, 0, 0.7);
}


.cta-button.highlighted-cta:hover {
    background-color: #ffc107;
    box-shadow: 0 0 30px rgba(255, 193, 7, 0.9);
}

.faq-section {
    margin-top: 40px;
    padding: 20px;
    background-color: var(--card-background); /* Use card background for the section */
    border-radius: 8px;
    border: 1px solid var(--border-color); /* Add border for consistency */
    color: var(--primary-text-color); /* Use primary text color */
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--accent-color); /* Accent color for heading */
    font-size: 2em;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--background-color); /* Use general background for items */
    margin-bottom: 10px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border-color); /* Add border for consistency */
}

.faq-question {
    width: 100%;
    background-color: transparent; /* Transparent to blend with faq-item background */
    color: var(--primary-text-color); /* Use primary text color */
    border: none;
    padding: 15px 20px;
    text-align: left;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid var(--border-color); /* Separator between question and answer */
}

.faq-question:hover, .faq-question.active {
    background-color: var(--card-background); /* Use card background for hover */
}

.faq-icon {
    font-size: 1.5em;
    transition: transform 0.3s ease;
}

.faq-question.active .faq-icon {
    transform: rotate(45deg); /* Rotate plus to form an X */
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
}

.faq-answer.active {
    max-height: 1000px; /* Large enough to fit all content, allowing transition */
    padding: 15px 20px;
}

.faq-answer p {
    margin: 0;
    line-height: 1.6;
    color: var(--secondary-text-color); /* Use secondary text color */
}

.table-responsive-wrapper {
    overflow-x: scroll;
    width: 100%;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scrollbar-width: auto; /* For Firefox */
    scrollbar-color: var(--accent-color) var(--card-background); /* For Firefox */
}

/* Styles for the contract address and copy button */
.address-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    word-break: break-all; /* This will wrap the long address string */
    text-align: center;
}

.copy-button {
    background-color: var(--accent-color);
    color: #ffffff;
    padding: 8px 15px;
    border-radius: 5px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.9em;
}

.copy-button:hover {
    transform: scale(1.05);
    background-color: #007bb5;
}

/* Social Media Links */
#social-links {
    text-align: center;
    margin-top: 40px;
}

#social-links h3 {
    margin-bottom: 20px;
    font-size: 1.5em;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
}

.social-icon {
    color: var(--secondary-text-color);
    transition: all 0.3s ease;
    display: inline-block; /* To allow transform */
}

.social-icon:hover {
    color: var(--accent-color);
    transform: scale(1.15);
}

.social-icon svg, .social-icon img {
    width: 32px;
    height: 32px;
}

.social-icon.social-youtube:hover {
    color: #FF0000; /* YouTube Red */
}


/* Custom Scrollbar Design */
/* For Webkit Browsers (Chrome, Safari, Edge) */
.table-responsive-wrapper::-webkit-scrollbar {
    height: 12px;
}

.table-responsive-wrapper::-webkit-scrollbar-track {
    background: var(--card-background);
    border-radius: 10px;
}

.table-responsive-wrapper::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 10px;
    border: 3px solid var(--card-background);
}

.table-responsive-wrapper::-webkit-scrollbar-thumb:hover {
    background-color: #ffffff;
}

/* Styles for new smart-contracts page sections */
.contract-detail-group {
    font-size: 0.85em;
    color: var(--secondary-text-color);
    margin-top: 5px;
    padding-left: 15px;
    width: 100%;
    text-align: right;
}

.article-title, .article-subtitle {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.article-title {
    font-size: 1.5em;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.article-subtitle {
    font-size: 1.2em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.oracle-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
    text-align: left;
}

.oracle-card {
    background-color: var(--background-color);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.oracle-card h4 {
    margin-top: 0;
    color: var(--accent-color);
}

.button-container {
    text-align: center;
    margin: 30px 0;
}
