body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fdfdfd;
    color: #333;
}

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

@media (max-width: 600px) {
    .container {
        padding: 10px; /* Reduced padding for mobile */
    }
}

/* Header with fire background */
header {
    position: relative;
    background: url('fireheaderfooter.png') no-repeat top center;
    background-size: cover;
    min-height: 200px;
    border-bottom: 2px solid #ffa500;
    color: #fff;
    z-index: 1;
}

@media (max-width: 600px) {
    header {
        min-height: 150px; /* Shorter header for mobile */
    }
}

footer {
    position: relative;
    background: url('fireheaderfooter.png') no-repeat bottom center;
    background-size: cover;
    min-height: 150px;
    padding-top: 20px; /* Reduced for even top spacing */
    padding-bottom: 20px; /* Added for even bottom spacing */
    border-top: 2px solid #ffa500;
    color: #fff;
    z-index: 1;
}

.header-flex {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
}

@media (max-width: 600px) {
    .header-flex {
        flex-direction: column; /* Stack logo and content vertically */
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
    }
}

.logo {
    height: 150px;
    width: auto;
    margin-right: 20px;
}

@media (max-width: 600px) {
    .logo {
        height: 100px; /* Smaller logo for mobile */
        margin-right: 0;
        margin-bottom: 10px;
    }
}

.header-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 150px;
}

@media (max-width: 600px) {
    .header-content {
        height: auto; /* Allow content to take natural height */
        width: 100%; /* Full width for mobile */
    }
}

header p {
    margin: 0 0 10px;
    font-style: italic;
    color: #fff8dc;
}

@media (max-width: 600px) {
    header p {
        font-size: 0.9rem; /* Smaller tagline text */
        margin-bottom: 5px;
    }
}

nav {
    display: flex;
    flex-wrap: wrap; /* Allow nav links to wrap */
}

nav a {
    margin-right: 20px;
    text-decoration: none;
    color: #ffcc66;
    font-weight: bold;
    transition: color 0.2s ease;
}

nav a:hover {
    color: #fff;
}

@media (max-width: 600px) {
    nav a {
        margin-right: 10px;
        margin-bottom: 5px;
        font-size: 0.85rem; /* Smaller nav text */
    }
}

main {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 10px;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 70vh;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

@media (max-width: 600px) {
    main {
        padding: 20px; /* Reduced padding for mobile */
    }
}

h2 {
    color: #ff6600;
}

.footer-text {
    font-size: 14px;
    color: #fff8dc;
    text-align: center;
}

footer #contract {
    cursor: pointer;
    color: #ffd700;
    font-weight: bold;
    transition: color 0.2s ease;
}

footer #contract:hover {
    color: #fff;
    text-decoration: underline;
}

/* -----------------------
   Chart Grid Styling
   ----------------------- */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

@media (max-width: 600px) {
    .chart-grid {
        grid-template-columns: 1fr; /* Single column for mobile */
        gap: 20px;
    }
}

.chart-box {
    background-color: #ffffff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: 300px;
    overflow: hidden;
}

.chart-box h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    color: #444;
    text-align: center;
}

.chart-box canvas {
    width: 100% !important;
    height: 250px !important;
}

/* Header-Aligned Image Styling */
.header-aligned-image {
    max-width: 800px;  /* This makes it narrower than the 1000px main container */
    margin: 20px auto;
    text-align: center;
}

@media (max-width: 600px) {
    .header-aligned-image {
        max-width: 100%; /* Full width for mobile */
    }
}

.dutch-auction-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    display: block;
    box-sizing: border-box;
}

.dutch-auction-img:hover {
    transform: scale(1.05);
}

.header-aligned-image .caption {
    font-size: 0.9rem;
    color: #555;
    margin-top: 10px;
    font-style: italic;
}

.header-aligned-image a {
    text-decoration: none;
    display: block; /* Wrap image properly */
    width: 100%; /* Match container */
}

.table-wrapper {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    margin-bottom: 20px;
}

.table-wrapper table {
    border-collapse: collapse;
    width: 100%;
    max-width: 800px;
}

/* Pre-sale table responsiveness */
@media (max-width: 600px) {
    table {
        font-size: 12px; /* Smaller font for small screens */
    }

    table th, table td {
        padding: 6px 8px; /* Slightly smaller padding */
        word-break: break-word; /* Ensure text breaks instead of overflowing */
    }

    table td strong {
        font-weight: 600; /* Slightly thinner bold for better fit */
    }
}

/* Styles for social icons in header (twitter-nav) */
.twitter-nav {
    margin-top: 10px; /* Space between nav and icons */
    display: flex; /* Make icons sit side by side */
    gap: 10px; /* Space between icons */
    align-items: center; /* Vertically align icons */
    flex-wrap: wrap; /* Allow icons to wrap on small screens */
}

.twitter-icon, .telegram-icon, .reddit-icon, .dexscreener-icon, .birdeye-icon, .jupiter-icon, .solscan-icon, .cmc-icon, .coingecko-icon {
    width: 30px; /* Fixed width for consistency */
    height: 30px; /* Fixed height for consistency */
    object-fit: contain; /* Prevent distortion */
    transition: transform 0.2s ease; /* Smooth hover effect */
}

.twitter-icon:hover, .telegram-icon:hover, .reddit-icon:hover, .dexscreener-icon:hover, .birdeye-icon:hover, .jupiter-icon:hover, .solscan-icon:hover, .cmc-icon:hover, .coingecko-icon:hover {
    transform: scale(1.1); /* Slight zoom on hover */
}

@media (max-width: 600px) {
    .twitter-icon, .telegram-icon, .reddit-icon, .dexscreener-icon, .birdeye-icon, .jupiter-icon, .solscan-icon, .cmc-icon, .coingecko-icon {
        width: 24px; /* Smaller icons for mobile */
        height: 24px;
    }
}

/* Footer text styles */
.footer-text {
    font-size: 14px;
    color: #fff8dc;
    text-align: center;
    white-space: normal; /* Allow text wrapping */
    word-break: break-all; /* Break long words (like contract address) */
}

footer #contract {
    cursor: pointer;
    color: #ffd700;
    font-weight: bold;
    transition: color 0.2s ease;
    display: inline-block; /* Allow wrapping */
    word-break: break-all; /* Ensure long address breaks */
}

/* Footer Address Styling */
.address-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 10px 0;
}

.address-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
    max-width: 500px;
}

.address-label {
    color: #fff8dc;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 5px;
}

.address-input {
    display: flex;
    align-items: center;
    border: 1px solid #ffa500;
    border-radius: 5px;
    background-color: rgba(51, 51, 51, 0.3);
    padding: 5px;
    width: 100%;
    box-sizing: border-box;
    min-height: 40px; /* Consistent height for both boxes */
}

.address-text {
    color: #fff8dc;
    font-size: 12px;
    word-break: break-all;
    overflow-wrap: break-word;
    white-space: normal;
    flex-grow: 1;
    margin-right: 10px;
    max-height: 60px; /* Allow ~2-3 lines */
    overflow: hidden;
}

.copy-btn {
    background-color: #ffa500;
    color: #fff;
    padding: 5px 10px;
    border: none;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    align-self: center; /* Align button vertically */
}

.copy-btn:hover {
    background-color: #ffcc66;
}

@media (max-width: 600px) {
    .address-container {
        flex-direction: column;
        flex-wrap: wrap;
        gap: 15px;
    }

    .address-box {
        width: 100%;
        max-width: 100%;
    }

    .address-label {
        font-size: 12px;
    }

    .address-text {
        font-size: 10px;
        max-height: 48px; /* Adjusted for smaller font */
    }

    .address-input {
        min-height: 36px; /* Slightly smaller for mobile */
    }

    .copy-btn {
        font-size: 10px;
        padding: 4px 8px;
    }
}