:root {
    --bg-primary: #FFF9C4;
    --accent-cta: #FFEB3B;
    --highlight-secondary: #FFA000;
    --text-dark: #333333;
    --neutral-white: #FFFFFF;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    --form-bg: #FFF9E5;
    --form-text: #1F1F1F;
    --form-accent: #F4B400;
    --form-radius: 12px;
    --form-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
#header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: box-shadow 0.3s ease;
}

#header.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

#header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 700;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--highlight-secondary);
}

.hamburger {
    display: none;
    border: none;
    background: none;
    cursor: pointer;
    padding: 5px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}


/* Hero Section */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 100px 0;
    background-color: var(--bg-primary); /* fallback */
    overflow: hidden;
}

#hero-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    z-index: 0;
    pointer-events: none;
    /* animated diagonal gradient */
    background: linear-gradient(45deg,
        #FFF9C4 0%,
        #FFE082 30%,
        #FFD54F 60%,
        #FFFFFF 100%);
    background-size: 300% 300%;
    filter: blur(32px) saturate(1.05);
    opacity: 0.95;
    will-change: background-position;
    animation: gradientMove 20s linear infinite;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--text-dark);
    text-shadow: 0 1px 0 rgba(255,255,255,0.2); /* subtle lift for contrast on very light areas */
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtext {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

.fade-in {
    animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Hero buttons layout */
.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
}

/* wrapper for contract button so popup can be absolutely positioned without affecting layout */
.contract-btn-wrapper {
    position: relative;
    display: inline-block;
}

/* Copy confirmation popup styled to float above the button */
.copy-confirm {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    bottom: 100%;
    margin-bottom: 10px;
    background: #1F1F1F;
    color: #FFF9E5;
    padding: 8px 10px;
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    font-size: 0.9rem;
    transition: opacity 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

/* visible state controlled with .active */
.copy-confirm.active {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background-color: var(--accent-cta);
    color: var(--text-dark);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 1rem;
    border-radius: 50px;
    border: 2px solid var(--highlight-secondary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 160, 0, 0.2);
}

.cta-button:hover {
    background-color: var(--highlight-secondary);
    color: var(--neutral-white);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 160, 0, 0.4);
}

.coin-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.cta-button:hover .coin-icon {
    transform: rotate(360deg);
}

/* General Section Styling */
section {
    padding: 80px 0;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.7) 15%, rgba(255,255,255,0.7) 85%, rgba(255,255,255,0) 100%);
}

/* Friendship Coin Section (replaces old 'About' content) */
#about {
    background: linear-gradient(180deg, #FFF9E5 0%, #FFFFFF 100%); /* soft gradient for depth */
}

.friendship-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Desktop: 3 in a row */
    gap: 20px;
    margin: 50px auto;
    max-width: 900px; /* Limit width for images */
}

.friendship-image {
    width: 100%;
    aspect-ratio: 16/9; /* Maintain aspect ratio */
    object-fit: cover; /* Cover the area, crop if necessary */
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.friendship-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.15);
}

#about .cta-button { /* Center the new "About Friendship Coin" button */
    margin-top: 50px;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
}

.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
}

/* How to Buy Section */
#how-to-buy .cta-button {
    margin-top: 50px;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.step-card h3 { /* Center headings within step cards */
    text-align: center;
    margin-bottom: 10px; /* Add some spacing below the heading */
}

.step-card p { /* Center paragraph text within step cards */
    text-align: center;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--highlight-secondary);
    background-color: var(--accent-cta);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.step-card:hover .step-number {
    transform: scale(1.1) rotate(5deg);
    animation: wiggle 0.4s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: scale(1.1) rotate(5deg); }
    50% { transform: scale(1.1) rotate(-5deg); }
}

/* Liquidity Injection Form */
#liquidity-form {
    max-width: 700px;
    width: 100%;
    margin: 30px auto 0;
    background: var(--neutral-white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

#liquidity-form.ct-form {
    max-width: 600px;
    width: 100%;
    margin: 30px auto 0;
    background: var(--form-bg);
    padding: 28px;
    border-radius: var(--form-radius);
    box-shadow: var(--form-shadow);
    color: var(--form-text);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
#liquidity-form.ct-form.fade-in { opacity: 0; transform: translateY(10px); }
#liquidity-form.ct-form.fade-in.visible, #liquidity-form.ct-form.fade-in { opacity: 1; transform: translateY(0); }

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.form-group label .required-asterisk {
    color: #d9534f;
    font-weight: 700;
    margin-left: 4px;
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02) inset;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--highlight-secondary);
    box-shadow: 0 0 0 3px rgba(255, 235, 59, 0.5);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    background: var(--accent-cta);
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.3s ease;
}
.form-submit:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(255,160,0,0.18);
    background: linear-gradient(90deg, #FFEB3B 0%, #FFD54F 100%);
}

.form-group label .optional-text {
    color: #888;
    font-size: 0.9rem;
    margin-left: 6px;
    font-weight: 400;
}

.form-group.error input,
.form-group.error textarea {
    border-color: #d9534f;
}

.form-group.error .error-message {
    display: block;
}

.form-status {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-weight: 700;
    display: none;
}
.form-status.success {
    display: block;
    background: #e6f4ea;
    color: #1b5e20;
    border: 1px solid #cfe8d3;
}
.form-status.error {
    display: block;
    background: #fdecea;
    color: #8a1f11;
    border: 1px solid #f3c6c2;
}

#form-success-message {
    margin-top: 20px;
    padding: 15px;
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
    border-radius: 8px;
    text-align: center;
    display: none;
}

/* Submit button accent override */
#liquidity-form .form-submit {
    background: var(--form-accent);
    color: #1f1f1f;
    border: none;
    padding: 12px 18px;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(244,180,0,0.14);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
#liquidity-form .form-submit:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(244,180,0,0.18); }
#liquidity-form .form-submit:hover .coin-icon { transform: rotate(360deg); transition: transform 0.6s cubic-bezier(.68,-0.55,.27,1.55); }

/* Success / Error messages consistent styling */
#liquidity-form .form-status {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-weight: 700;
    display: none;
}
#liquidity-form .form-status.success {
    display: block;
    background: #eaf6e6;
    color: #1b5e20;
    border: 1px solid #cfe8d3;
}
#liquidity-form .form-status.error {
    display:block;
    background: #fff2f0;
    color: #8a1f11;
    border: 1px solid #f3c6c2;
}

/* small responsive tweak */
@media (max-width: 600px) {
    #liquidity-form.ct-form { padding: 18px; border-radius: 10px; }
    #liquidity-form .form-actions { text-align: center; }
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
}

/* Responsive adjustments for images in Friendship Coin section */
@media (max-width: 600px) {
    .friendship-images {
        grid-template-columns: 1fr; /* Mobile: 1 per row */
        max-width: 300px; /* Optional: smaller max-width for very small screens */
    }
}

/* Donation Tracker Section */
#donation-tracker {
    background: linear-gradient(180deg, #FFFDE7 0%, #FFF9C4 50%, #FFFFFF 100%);
}

.tracker-widget {
    position: relative;
    background: var(--neutral-white);
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.07);
    max-width: 900px;
    margin: 40px auto 0;
    overflow: hidden;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    animation: spin 1.5s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.widget-header {
    display: flex;
    justify-content: space-around;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    text-align: center;
}

.stat-item .stat-label {
    display: block;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 5px;
}

.stat-item .stat-value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-dark);
}

.wallet-link {
    display: block;
    text-align: center;
    margin-bottom: 30px;
    color: var(--highlight-secondary);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease, letter-spacing 0.3s ease;
}

.wallet-link:hover {
    color: var(--accent-cta);
    letter-spacing: 0.5px;
}

.transactions-container {
    width: 100%;
    overflow-x: auto;
}

.tracker-widget table {
    width: 100%;
    border-collapse: collapse;
}

.tracker-widget th, .tracker-widget td {
    padding: 12px 15px;
    text-align: left;
}

.tracker-widget th {
    font-family: var(--font-heading);
    color: #777;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #f0f0f0;
}

.tracker-widget tbody tr {
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.3s ease;
}

.tracker-widget tbody tr:last-child {
    border-bottom: none;
}

.tracker-widget tbody tr:hover {
    background-color: #fffdef;
}

.token-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.token-cell img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.proof-link {
    display: inline-block;
    padding: 5px 10px;
    background-color: var(--accent-cta);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    transition: background-color 0.3s ease;
}

.proof-link:hover {
    background-color: var(--highlight-secondary);
    color: var(--neutral-white);
}

.no-transactions-message {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.widget-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
    font-size: 0.8rem;
    color: #aaa;
}

/* FriendshipCoin Liquidity Tracker (fc-tracker) Styles */
/* Base styles moved from tracker.js inline block */
#fc-tracker{
    background:#0e1317;
    color:#e8edf2;
    border-radius:14px;
    padding:20px;
    box-shadow:0 12px 40px rgba(0,0,0,0.6);
    max-width:1000px;
    margin:40px auto;
}
#fc-tracker .top{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:14px
}
#fc-tracker .fc-chip{
    background:rgba(255,213,79,0.08);
    color:#ffd54f;
    padding:6px 10px;
    border-radius:999px;
    font-weight:600
}
#fc-tracker .fc-table-wrap{
    overflow:auto;
    border-radius:10px;
    background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    padding:8px
}
#fc-tracker table{
    width:100%;
    border-collapse:collapse;
    color:#e8edf2
}
#fc-tracker td, #fc-tracker th{
    padding:10px
}
#fc-tracker .token-logo{
    width:36px;
    height:36px;
    border-radius:8px;
    background:#0b0f12
}
#fc-tracker a.fc-link{
    background:#ffd54f;
    color:#0e1317;
    padding:8px 12px;
    border-radius:10px;
    text-decoration:none;
    font-weight:700
}

/* Mobile optimizations for FriendshipCoin Liquidity Tracker */
@media (max-width: 768px) {
    #fc-tracker .top h3 { /* Section heading: "FriendshipCoin Liquidity Tracker" */
        font-size: 18px !important; /* Use !important to override inline style if any */
        margin-right: 10px; /* Add some spacing if chips are on the same line */
    }

    #fc-tracker .fc-meta { /* Subheading: "Monitoring wallet ..." and Balance */
        font-size: 14px;
        line-height: 1.4; /* Ensure readability */
    }

    #fc-tracker table th,
    #fc-tracker table td { /* Table headers and cells */
        font-size: 12px;
        padding: 8px; /* Reduce padding slightly */
    }
    
    #fc-tracker #fc-no-tx, /* Status text: "No outgoing transactions found." */
    #fc-tracker #fc-last-updated { /* Status text: "Last updated" */
        font-size: 12px;
        line-height: 1.4; /* Ensure readability */
    }

    /* Adjust the top section layout for smaller screens */
    #fc-tracker .top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    #fc-tracker .fc-actions {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 10px;
    }

    #fc-tracker .fc-link {
        width: 100%; /* Make the link full width */
        text-align: center;
    }

    #fc-tracker .fc-chip {
        font-size: 12px;
        padding: 4px 8px;
    }

    #fc-tracker .token-logo img {
        width: 24px !important;
        height: 24px !important;
    }

    #fc-tracker .amount {
        font-size: 12px;
    }
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}


/* Responsive Design */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }
    .card-grid, .steps-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--neutral-white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        margin: 20px 0;
    }

    .nav-links a {
        font-size: 1.5rem;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 2rem;
    }

    /* Responsive adjustments for images in Friendship Coin section */
    .friendship-images {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 in a row */
        max-width: 600px;
    }

    /* Responsive table for donation tracker */
    .tracker-widget table {
        border: 0;
    }
    .tracker-widget thead {
        display: none;
    }
    .tracker-widget tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        padding: 10px;
    }
    .tracker-widget td {
        display: block;
        text-align: right;
        border-bottom: 1px dotted #ccc;
        padding: 10px;
        position: relative;
    }
    .tracker-widget td:last-child {
        border-bottom: 0;
    }
    .tracker-widget td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.8rem;
        color: var(--text-dark);
    }

    .widget-header {
        flex-direction: column;
        gap: 20px;
    }
}

/* Footer specific styles */
footer#socials {
    background-color: #1a1a1a;
    color: #e0e0e0;
    padding: 40px 0 20px;
    text-align: center;
}

footer#socials .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-bottom: 10px; /* Adjusted to be above copyright */
}

/* Fix for footer social logo size */
.social-icons img {
    width: 32px; /* Set a fixed width */
    height: 32px; /* Set a fixed height */
    transition: transform 0.2s ease-in-out;
}

.social-icons a:hover img {
    transform: scale(1.1);
}

footer#socials p {
    font-size: 0.9rem;
    color: #a0a0a0;
}

footer#socials p a {
    color: var(--highlight-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

footer#socials p a:hover {
    color: var(--accent-cta);
    text-decoration: underline;
}