/* CSS Custom Properties for a consistent theme */
:root {
    --primary-color: #490eee;
    --secondary-color: #2cd1fa;
    --accent-color: #04eeff;
    --dark-bg: #0000007c;
    --light-bg: #222;
    --text-color: #f4f4f4;
    --input-bg: rgba(19, 18, 18, 0.582);
    --border-color: rgba(255, 255, 255, 0.4);
    --shadow-color: rgba(0, 0, 0, 0.541);
    --font-stack: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --header-font: 'Poppins', sans-serif;
}

/* General Body and Page Layout */
body {
    font-family: var(--font-stack);
    margin: 0;
    padding: 0;
    background: linear-gradient(145deg, var(--dark-bg), var(--primary-color), var(--secondary-color));
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Glassy effect for containers */
.container, .tab-content, .navbar, #jsonSections, button, .tab-btn {
    background: rgba(40, 40, 40, 0.45);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
    transition: all 0.3s ease-in-out;
}

/* Header Styling */
.site-header {
    background: transparent;
    padding: 70px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeIn 1s ease forwards;
    will-change: transform, opacity;
    -webkit-transform: translateZ(0);
}

/* Animated background glow */
.site-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(180, 152, 255, 0.4) 0%, transparent 60%),
        radial-gradient(circle, rgba(145, 255, 250, 0.336) 0%, transparent 60%);
    background-size: 100% 100%;
    background-position: top left, bottom right;
    animation: moveGlow 20s linear infinite;
    z-index: 0;
    will-change: transform;
    -webkit-transform: translateZ(0);
}

/* Glow animation */
@keyframes moveGlow {
    0% { transform: rotate(0deg) translate(0,0); }
    50% { transform: rotate(180deg) translate(10px,10px); }
    100% { transform: rotate(360deg) translate(0,0); }
}

/* Container & Headings */
.container { padding: 2rem; }
h2 { text-align: center; }

/* Navbar */
.navbar {
    display: flex;
    justify-content: center;
    padding: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Buttons */
.tab-btn, button, .download-button, .return-button button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: 8px;
    height: 40px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #007bff, #0056b3);
    box-shadow: 0 0 12px rgba(0, 123, 255, 0.7);
}

.tab-btn.active {
    background: #00d9ff;
    color: #000;
}

button:hover, .tab-btn:hover, .download-button:hover, .return-button button:hover {
    background: linear-gradient(135deg, #4b06cc, #0535b9);
    box-shadow: 0 0 20px rgba(0, 123, 255, 1);
    transform: scale(1.05);
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 1.5rem;
    margin-top: 1rem;
    border-radius: 10px;
    animation: fadeIn 0.5s ease-in-out;
}
.tab-content.active { display: block; }

/* Dropdown */
.json-select { text-align: center; margin: 0 0 0 10px; }
#jsonSections {
    padding: 8px 12px;
    font-size: 16px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(30,30,46,0.45);
    color: #fff;
    cursor: pointer;
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    transition: all 0.3s ease;
}
#jsonSections:hover, #jsonSections:focus {
    border: 1px solid #4b06cc;
    box-shadow: 0 0 15px rgba(75,6,204,0.7);
    outline: none;
}

/* Links */
a { color: #66d9ef; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.instructions-section {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(28, 28, 28, 0.6); /* Glassy effect */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.instructions-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.section-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

/* Footer */
.site-footer {
    position: relative;
    padding: 20px 40px;
    margin-top: 40px;
    background: rgba(28,28,28,0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.4);
    transition: all 0.5s ease-in-out;
    border-radius: 15px 15px 0 0;
}
.site-footer:hover {
    transform: translateY(-5px);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.6),0 -2px 10px rgba(84,238,199,0.5);
}
.footer-content { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 15px; color: #ccc; font-size: 0.9rem; }
.footer-content p { margin: 0; font-weight: 300; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--secondary-color); text-decoration: none; transition: 0.3s; }
.footer-links a:hover { color: var(--accent-color); text-shadow: 0 0 8px rgba(84,238,199,0.6); }

/* Responsive Footer */
@media (max-width: 768px) { .footer-content { flex-direction: column; text-align: center; } }
