/* Modern Dark/Silver Theme */
body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #0a0a0a; /* Deep Black */
    text-align: center;
    color: #e0e0e0; /* Light Gray/Silver text */
}

header {
    background: linear-gradient(145deg, #1a1a1a, #000000);
    color: #ffffff;
    padding: 60px 20px;
    border-bottom: 1px solid #444; /* Subtle silver divider */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

header h1 {
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(to right, #ffffff, #888888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.back-link {
    display: inline-block;
    margin-top: 25px;
    text-decoration: none;
    color: #888;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #ffffff;
}

.intro {
    padding: 50px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.intro h2 {
    color: #ffffff;
    font-weight: 300;
}

/* Flex Container */
.flex-container {
    display: flex;
    flex-wrap: wrap; 
    justify-content: center;
    gap: 40px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Modern Silver Card */
.card {
    background: #161616; /* Near Black */
    border: 1px solid #333;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    flex: 1 1 300px; 
    max-width: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    border-color: #666; /* Brightens on hover */
    transform: translateY(-5px);
}

.card h3 {
    color: #ffffff;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
    font-weight: 600;
}

/* 3D Box Styling */
.box-container {
    background-color: #0f0f0f; /* Inset look */
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px 0;
    border-radius: 12px;
    perspective: 800px;
    border: 1px inset #222;
}

.box {
    width: 110px;
    height: 110px;
    background: linear-gradient(135deg, #ffffff 0%, #a1a1a1 100%); /* Silver Metallic */
    color: #000;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-radius: 4px;
}

/* Code Snippet Styling */
code {
    background-color: #000000;
    color: #c0c0c0; /* Silver text */
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: left;
    border: 1px solid #222;
    font-family: 'Courier New', Courier, monospace;
}

/* Hover States for 3D boxes */
.rotateX-box:hover {
    transform: rotateX(180deg);
}

.rotateY-box:hover {
    transform: rotateY(180deg);
}

.translateZ-box:hover {
    transform: translateZ(120px);
    background: #ffffff; /* Bright white highlight */
    box-shadow: 0 20px 50px rgba(255,255,255,0.1);
}