/* General Styling & Reset */
:root {
    --header-bg: #2e8b57; /* Green */
    --body-bg: #000000;
    --text-color: #ffffff;
    --border-color: #ffffff;
    --sidebar-bg: rgba(20, 20, 20, 0.9);
    --link-color: #4db8ff;
    --header-height: 60px;
    --header-height-scrolled: 50px;
}

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

body {
    background-color: var(--body-bg);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

/* Background Canvas */
#blockchain-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Header */
#main-header {
    background-color: var(--header-bg);
    height: var(--header-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: center; /* Center the .header-content */
    align-items: center;
    padding: 0 20px;
    transition: height 0.3s ease;
}

#main-header.scrolled {
    height: var(--header-height-scrolled);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.header-content {
    display: flex;
    align-items: center;
}

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

#main-header.scrolled .logo {
    height: 35px;
}

#main-header h1 {
    font-size: 1.5rem;
    color: var(--text-color);
}

/* Menu Toggle Button - Positioned to the left */
#menu-toggle {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 1001;
}


/* Sidebar Menu */
#sidebar {
    position: fixed;
    top: 0;
    left: -200px; /* Hidden by default */
    width: 180px;
    height: 100%;
    background-color: var(--sidebar-bg);
    backdrop-filter: blur(5px);
    padding-top: var(--header-height);
    z-index: 999;
    transition: left 0.3s ease-in-out;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

#sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header h3 {
    font-size: 1.2rem;
}

#menu-list {
    list-style-type: none;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

#menu-list li {
    color: var(--text-color);
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease;
    font-size: 0.9rem;
}

#menu-list li:hover {
    background-color: var(--header-bg);
}

/* Main Content Area */
#content-area {
    padding: calc(var(--header-height) + 20px) 20px 80px 20px; /* Top padding for header, bottom for footer */
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    transition: margin-left 0.3s ease-in-out;
}

/* Tool Card Styling */
.tool-card {
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.tool-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--header-bg);
}

.tool-card p {
    margin-bottom: 10px;
    line-height: 1.6;
    flex-grow: 1; /* Pushes the link to the bottom */
}

.tool-card p strong {
    color: #cccccc;
}

.tool-card-link {
    display: inline-block;
    background-color: var(--header-bg);
    color: var(--text-color);
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    margin-top: auto; /* Aligns to the bottom */
}

.tool-card-link:hover {
    background-color: #3ca96c;
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #111;
    border-top: 1px solid #333;
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    #main-header h1 {
        font-size: 1.2rem;
    }

    .logo {
        height: 35px;
    }
    
    #content-area {
        grid-template-columns: 1fr; /* Stack cards vertically */
    }
}

@media (max-width: 480px) {
    #main-header {
        padding: 0 10px;
    }
    #main-header h1 {
        font-size: 1.1rem;
    }
    .logo {
        display: none; /* Hide logo on very small screens */
    }
    #menu-toggle {
        left: 10px;
    }
}