/* =================================================================
   Global Styles & Base Layout
   ================================================================= */
body {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    font-family: 'Inter', sans-serif; 
    background: transparent; 
    color: #e5e7eb; 
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

html { 
    background-color: #0c0a18; 
}

/* =================================================================
   Background Effects
   ================================================================= */
#galaxy-container, .sparkle-canvas { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh; 
    z-index: -1; 
}

#galaxy-container {
    background-color: #0c0a18;
}

#starfield-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#galaxy-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('planetary_city_foreground.png');
    background-position: bottom center;
    background-size: cover;
    mix-blend-mode: overlay, hard-light;
    pointer-events: none;
}


.sparkle-canvas { 
    pointer-events: none; 
    z-index: 9999; 
}

/* =================================================================
   Typography & Shared Elements
   ================================================================= */
.font-orbitron { 
    font-family: 'Orbitron', sans-serif; 
}

.section-divider {
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #8B5CF6, #EC4899, #8B5CF6, #EC4899, #e0d9fe, #ffffff);
    margin: 0 auto;
    border-radius: 99px;
}

/* =================================================================
   Themed Container Styles
   ================================================================= */
.steel-card { 
    position: relative;
    overflow: hidden;
    background-color: rgba(31, 41, 55, 0.8);
    background-image: url('steel-texture.jpg');
    background-size: auto;
    background-position: center;
    background-blend-mode: overlay, soft-light;
    border-radius:1rem; 
    border:1px solid rgba(139,92,246,0.2); 
    box-shadow:inset 0 0 20px rgba(255,255,255,0.05),0 4px 20px rgba(0,0,0,0.6); 
    backdrop-filter:blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-position 0.7s ease-out;
}

.steel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(167, 139, 250, 0.3);
    background-position: 0% 0%;
}

.ui-panel {
    background-color: rgba(55, 48, 107, 0.6);
    background-image: url('hex-texture.jpg');
    background-size: cover;
    background-blend-mode: overlay, soft-light;
    border-radius:1rem; 
    border:1px solid rgba(139,92,246,0.3); 
    box-shadow:inset 0 0 15px rgba(0,0,0,0.5), 0 0 20px rgba(139,92,246,0.2); 
    backdrop-filter:blur(12px); 
    -webkit-backdrop-filter: blur(12px);
}

.content-block {
    background-color: rgba(30, 41, 59, 0.75); 
    background-image: url('carbon-fiber.jpg');
    background-size: cover;
    background-blend-mode: overlay;
    border-radius:1rem; 
    border:1px solid rgba(139,92,246,0.2); 
    box-shadow:inset 0 0 20px rgba(255,255,255,0.05),0 4px 20px rgba(0,0,0,0.6); 
    backdrop-filter:blur(8px); 
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.content-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(167, 139, 250, 0.2);
}


/* =================================================================
   Forms & Buttons
   ================================================================= */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
    background-color: #8B5CF6;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #7c3aed;
    transform: scale(1.05);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #8B5CF6;
    background-size: cover;
    background-position: center;
    mix-blend-mode: screen;
    opacity: 0.4;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 0.6;
}

.form-input {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-input::placeholder { color: #9ca3af; }

.form-input:focus {
    outline: none;
    border-color: #a78bfa;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 2px rgba(167, 139, 250, 0.3);
}

.tag-button {
    position: relative;
    overflow: hidden;
    z-index: 1;
    background-color: rgba(139, 92, 246, 0.2);
    color: #8B5CF6;
    border: 1px solid rgba(139, 92, 246, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-button::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('hex-texture.jpg');
    background-size: cover;
    background-position: center;
    mix-blend-mode: overlay;
    opacity: 0.1;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.tag-button.active, .tag-button:hover {
    background-color: rgba(139, 92, 246, 0.4);
    color: #e0d9fe;
    border-color: rgba(139, 92, 246, 0.5);
}

.tag-button:hover::before {
    opacity: 0.2;
}

/* =================================================================
   Glass Panel Effect
   ================================================================= */
.interactive-glass-panel {
    background: rgba(2, 6, 23, 0.4);
    mix-blend-mode: overlay, soft-light;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(139,92,246,0.3);;
    border-radius: 1rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

/* =================================================================
   Page-Specific (Blog)
   ================================================================= */
.prose-styles h3 { 
    font-family: 'Orbitron', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #d8b4fe;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose-styles p, .prose-styles li { 
    color: #d1d5db; 
    line-height: 1.75; 
    margin-bottom: 1.25rem;
    max-width: 75ch;
}

.prose-styles a { 
    color: #c084fc;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}
.prose-styles a:hover {
    color: #e9d5ff;
}

.prose-styles ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-bottom: 1.25rem;
}

.prose-styles li {
    margin-bottom: 0.5rem;
}

.prose-styles strong {
    color: #f3f4f6;
}

aside.sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 7rem;
    align-self: start;
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: none;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 100;
}

.back-to-top.show {
    display: block;
    opacity: 1;
}

/* =================================================================
   Page-Specific (Emporium)
   ================================================================= */
#stack-links-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.7s ease-in-out, padding-top 0.7s ease-in-out, margin-top 0.7s ease-in-out;
}

#stack-links-container.expanded {
    max-height: 500px; 
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.product-image {
    border-radius: 0.375rem;
    border: 1px solid rgba(139, 92, 246, 0.2);
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}