body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0f172a; /* Dark Slate Blue background */
    color: #e2e8f0; /* Lighter Slate text color */
    margin: 0;
    padding: 0;
    line-height: 1.6;
    position: relative;
    cursor: none; /* Hide the default cursor */
}

header {
    background-color: #0b111e; /* Very Dark Blue header background */
    color: #cffafe; /* Light Cyan header text */
    padding: 1rem 2rem;
    text-align: center;
    border-bottom: 5px solid #1e3a5f; /* Darker Blue accent border */
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

header .logo {
    height: 50px; /* Adjust size as needed */
    margin-right: 15px;
    vertical-align: middle;
}

header p {
    margin: 0.5rem 0 0;
    font-style: italic;
    color: #94a3b8; /* Slate Gray subtitle text */
}

#command-details-area {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); /* Increased from 300px to 400px */
    gap: 30px; /* Increased from 25px to 30px */
    padding: 25px;
    max-width: 1200px;
    margin: 20px auto;
}

.command-container {
    background: linear-gradient(145deg, #213045, #1a2535); /* Subtle gradient for depth */
    border: 1px solid #476691; /* Slightly lighter border for definition */
    border-top: 4px solid #334a6c; /* Thicker top border */
    border-bottom: 4px solid #334a6c; /* Thicker bottom border */
    border-radius: 6px; /* Slightly more rounded */
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5), /* Enhanced shadow */
                inset 0 2px 4px rgba(0, 0, 0, 0.3); /* Deeper inset shadow */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    position: relative;
    overflow: hidden; /* Hide potential overflow */
    display: flex;
    flex-direction: column;
    cursor: pointer; /* Show pointer cursor to indicate clickable */
}

.command-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.6),
                inset 0 2px 5px rgba(0, 0, 0, 0.4);
    border-color: #67e8f9; /* Bright cyan highlight */
    border-top-color: #67e8f9; /* Highlight top border */
    border-bottom-color: #67e8f9; /* Highlight bottom border */
}

.command-container h2 {
    color: #67e8f9; /* Bright Cyan accent color for heading */
    border-bottom: 2px solid #334a6c; /* Medium Blue accent border */
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.8rem; /* Increased from 1.6rem to 1.8rem */
    text-align: center;
}

.command-list {
    flex: 1;
    overflow-y: hidden; /* Initially hidden */
    max-height: 0; /* Start with no height */
    transition: max-height 0.5s ease-in-out; /* Smooth transition */
}

/* Class to apply when container is expanded */
.command-container.expanded .command-list {
    max-height: 600px; /* Increased from 500px to 600px */
    overflow-y: auto; /* Enable scrolling when expanded */
}

/* Add indicator for expandable content */
.command-container::after {
    content: "+";
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: #67e8f9;
    transition: transform 0.3s ease;
}

.command-container.expanded::after {
    content: "−"; /* Change to minus sign when expanded */
    transform: rotate(0deg);
}

.command {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #334a6c; /* Medium Blue separator */
}

.command:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.command code {
    background-color: #0f172a; /* Dark Slate Blue code background */
    color: #a5f3fc; /* Lighter Cyan code text */
    padding: 10px 12px; /* Increased from 8px 10px */
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    display: block;
    margin-bottom: 8px; /* Space below code */
    white-space: pre-wrap;
    word-wrap: break-word;
    border: 1px solid #293a50; /* Darker Slate border */
    font-size: 1rem; /* Slightly larger code font */
}

.command p {
    margin: 5px 0 0;
    font-size: 0.95rem;
    color: #cbd5e1; /* Lighter Slate description text */
    padding-left: 5px; /* Indent description slightly */
}

footer {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    background-color: #0b111e; /* Very Dark Blue footer, matching header */
    color: #64748b; /* Muted Slate footer text */
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 900px) { /* Increased breakpoint from 768px to 900px */
    #command-details-area {
        grid-template-columns: 1fr;
    }
    
    .command-container {
        margin-bottom: 25px; /* Increased from 20px */
    }
}

/* Custom Scrollbar Styling */
/* For Webkit browsers (Chrome, Safari, newer versions of Opera) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #0b111e; /* Very dark blue matching header/footer */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #334a6c; /* Medium blue matching borders */
    border-radius: 4px;
    border: 2px solid #0b111e; /* Border matching track color */
}

::-webkit-scrollbar-thumb:hover {
    background: #67e8f9; /* Bright cyan matching highlights */
}

/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #334a6c #0b111e; /* thumb and track colors */
}

/* Specific styling for command list scrollbars */
.command-list::-webkit-scrollbar {
    width: 8px; /* Slightly thinner */
}

.command-list::-webkit-scrollbar-thumb {
    background: #334a6c;
    border-radius: 4px;
}

.command-list::-webkit-scrollbar-thumb:hover {
    background: #67e8f9;
}

/* Replace the existing copyable styles with these improved ones */
.copyable {
    position: relative;
    cursor: pointer;
    padding-right: 35px !important; /* Slightly more room for the icon */
}

.copyable::after {
    content: "";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2367e8f9' viewBox='0 0 24 24'%3E%3Cpath d='M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.copyable:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.copyable.copied::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%2367e8f9' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    opacity: 1;
}

/* Improved tooltip styling */
/* Update the tooltip styling for better positioning */
.copy-tooltip {
    position: fixed;
    background-color: #1e3a5f;
    color: #67e8f9;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
    border: 1px solid #67e8f9;
    transform: translateY(-50%); /* Center vertically */
    white-space: nowrap; /* Prevent wrapping */
}

.copy-tooltip.visible {
    opacity: 1;
}

#dockerfile-examples code {
    white-space: pre;
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
    padding: 15px;
}

/* Make the Dockerfile example container take up 2 grid spaces like the compose example */
#dockerfile-examples {
    grid-column: span 2;
}

/* Responsive adjustment for the Dockerfile example */
@media (max-width: 900px) {
    #dockerfile-examples {
        grid-column: span 1;
    }
}

/* Make the sample compose container take up 2 grid spaces */
#sample-compose-file {
    grid-column: span 2;
}

/* Make Docker Best Practices span 2 columns */
#docker-best-practices {
    grid-column: span 2;
}

/* Responsive adjustment for Docker Best Practices */
@media (max-width: 900px) {
    #docker-best-practices {
        grid-column: span 1;
    }
}

/* Ensure the command-container can expand enough to show the full example */
.command-container.expanded .command-list {
    max-height: 800px; /* Increased from 600px to accommodate larger examples */
}

/* Responsive adjustment for the sample compose file */
@media (max-width: 900px) {
    #sample-compose-file {
        grid-column: span 1;
    }
}

/* Loading Screen Styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0f172a; /* Match the site background */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loading-screen p {
    color: #67e8f9;
    font-size: 1.2rem;
    margin-top: 20px;
    font-weight: bold;
    text-align: center;
}

.docker-logo-container {
    width: 120px;
    height: 80px;
    position: relative;
}

.docker-logo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 5px;
    width: 100%;
    height: 100%;
}

.docker-container {
    background-color: #67e8f9;
    border-radius: 2px;
    animation: pulse 1.5s infinite alternate;
}

.docker-container:nth-child(1) {
    animation-delay: 0s;
}
.docker-container:nth-child(2) {
    animation-delay: 0.2s;
}
.docker-container:nth-child(3) {
    animation-delay: 0.4s;
}
.docker-container:nth-child(4) {
    animation-delay: 0.1s;
}
.docker-container:nth-child(5) {
    animation-delay: 0.3s;
}
.docker-container:nth-child(6) {
    animation-delay: 0.5s;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.loading-hidden {
    opacity: 0;
    visibility: hidden;
}

/* Add this CSS rule for the grid group */
.grid-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    grid-column: span 2;
}

/* Update media query for responsiveness */
@media (max-width: 900px) {
    .grid-group {
        grid-template-columns: 1fr;
        grid-column: span 1;
    }
    
    #sample-compose-file {
        grid-column: span 1;
    }
}

/* Custom Docker cursor */
.docker-cursor {
    position: fixed;
    width: 30px;
    height: 30px;
    pointer-events: none; /* Ensure it doesn't interfere with clicking */
    z-index: 9999;
    filter: drop-shadow(0 0 5px rgba(37, 99, 235, 0.5));
    opacity: 0; /* Start hidden and show with JS after page load */
    transform-origin: center;
    border-radius: 50%;
    background-color: rgba(15, 23, 42, 0.4); /* slight dark background */
    padding: 3px;
    backdrop-filter: blur(2px);
}

/* Different cursor style for different elements */
.docker-cursor.clickable {
    transform: scale(1.2);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.7));
}

.docker-cursor.active {
    transform: scale(0.8);
    filter: drop-shadow(0 0 3px rgba(59, 130, 246, 0.9));
}

/* Hide cursor completely on mobile devices */
@media (max-width: 768px) {
    .docker-cursor {
        display: none;
    }
    
    body, a, button, .command-container, .copyable {
        cursor: auto; /* Restore default cursor on mobile */
    }
}

/* Different cursor size for clickable elements */
a, button, .command-container, .copyable {
    cursor: none; /* Hide default cursor */
}