html {
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}
body {
    margin: 0;
    padding: 0;
}

.shadow-ios-button {
    box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.2);
}

.shadow-ios-button:hover {
    box-shadow: inset 0px 2px 3px rgba(0, 0, 0, 0.2);
}
body {
    font-family: var(--default-font-family, 'IBM Plex Sans'), sans-serif !important;
    background-color: var(--page-bg-color, #f9fafb);
    color: var(--default-text-color, #000000);
}
.hero-bg {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.9) 0%, rgba(15, 23, 42, 0.9) 100%);
    background-image: url('../images/avctopbanner.png'); /* Adjusted path */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Ensure the background is initially hidden until loaded */
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Class to show background after loading */
.hero-bg.loaded {
    opacity: 1;
}

/* Ensure the hero section takes full viewport height */
#home {
    min-height: 100vh;
    height: auto;
    position: relative;
    top: 0px; /* Move home section up by 20px */
    z-index: 0;
}

/* Ensure background covers entire viewport */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
}

/* Ensure the content within hero section is properly positioned */
#home .container {
    position: relative;
    z-index: 2;
    /* Removed fixed height and flex centering to allow natural flow like bannertest.php */
    /* height: 100%; */
    /* display: flex; */
    /* flex-direction: column; */
    /* justify-content: center; */
}

/* Ensure the loader is properly positioned */
#hero-background-loader {
    z-index: 1;
}
/* Home section title color override */
#home h1 {
    color: #006DBF !important;
}
.formula-card {
    transition: transform 0.3s ease;
    border: 1px solid transparent;
}
.formula-card:hover {
    transform: translateY(-5px);
    animation: border-glow-green 2s infinite;
    border-color: #b2f2bb !important;
}
.login-form {
    display: none;
}
.active-login {
    display: block;
}

/* Professional "glass" image style used on pro websites */
.pro-glass-img {
    display: inline-block;
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 9999px;
    border: 1px solid rgba(255,255,255,0.35);
    background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    box-shadow:
        0 10px 30px rgba(2,6,23,0.18),
        0 2px 6px rgba(0,0,0,0.06),
        inset 0 1px 0 rgba(255,255,255,0.04);
    -webkit-backdrop-filter: blur(6px) saturate(120%);
    backdrop-filter: blur(6px) saturate(120%);
    transition: transform 0.28s cubic-bezier(.2,.8,.2,1), box-shadow 0.28s;
    transform: translateZ(0);
}

.pro-glass-img:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 18px 40px rgba(2,6,23,0.22),
        0 6px 12px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Professional "glass" card style (applies the glass effect to the whole card) */
.pro-glass-card {
    position: relative;
    border-radius: 0.75rem; /* matches existing rounded-lg */
    overflow: hidden;
    background: rgba(255, 255, 255, 0.15); /* More visible background */
    border: 1px solid rgba(255,255,255,0.3); /* More visible border */
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    backdrop-filter: blur(12px) saturate(150%);
    box-shadow:
        0 12px 30px rgba(2,6,23,0.2),
        0 3px 8px rgba(0,0,0,0.1);
    transition: transform 0.28s cubic-bezier(.2,.8,.2,1), box-shadow 0.28s;
}

.pro-glass-card:hover {
    transform: translateY(-5px);
    animation: border-glow-green 2s infinite;
    border-color: #b2f2bb !important;
}

/* Disable popup effect for hero texts inside #home section, but keep border glow */
#home .pro-glass-card:hover {
    transform: none;
}

/* Subtle overlay accent inside the card for depth */
.pro-glass-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
    mix-blend-mode: overlay;
}

/* Contact form inputs: hover/focus match hamburger pastel-green */
#card-send-message input:hover,
#card-send-message textarea:hover,
#card-send-message input:focus,
#card-send-message textarea:focus {
    border-color: #b2f2bb !important;
    box-shadow: 0 0 0 4px rgba(178,242,187,0.15) !important;
    outline: none !important;
}

/* Also ensure the input placeholder/label contrast remains readable on focus */
#card-send-message input:focus::placeholder,
#card-send-message textarea:focus::placeholder {
    color: #9aa199 !important;
    opacity: 1;
}

/* Contact email link style: default black, hover gold, no underline */
.contact-mail-link {
    color: #000000 !important;
    text-decoration: none !important;
    transition: color .12s ease;
}
.contact-mail-link:hover {
    color: #f59e0b !important;
    text-decoration: none !important;
}

/* Thumbs-up hover animation for contact email */
.contact-mail-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}
.contact-mail-thumb {
    display: inline-block;
    opacity: 0;
    transform: translateY(6px) scale(0.85);
    transition: opacity .22s ease, transform .22s ease;
    font-size: 1rem;
    pointer-events: none;
    will-change: transform, opacity;
    color: #16a34a; /* green tint for thumbs */
}
.contact-mail-wrap:hover .contact-mail-thumb {
    opacity: 1;
    transform: translateY(0) scale(1);
}
/* When clicked, fade-out animation */
.contact-mail-wrap.clicked .contact-mail-thumb {
    opacity: 0;
    transform: translateY(-12px) scale(0.7);
    transition: opacity .4s ease, transform .4s ease;
}

/* Send button styled like mobile menu buttons */
.send-menu-btn {
    display: flex; /* Changed to flex */
    align-items: center; /* Vertically center content */
    justify-content: center; /* Horizontally center content */
    height: 40px; /* Set button height to 40px */
    /* width: 100%; Removed to allow width:auto from inline style or other classes */
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: var(--btn-bg-color, linear-gradient(180deg, #ffffff 0%, #e9e9ea 100%));
    border: 1px solid var(--btn-border-color, rgba(0,0,0,0.14));
    color: var(--btn-text-color, #1e40af);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 12px var(--btn-shadow-color, rgba(0,0,0,0.18)), inset 0 2px 0 rgba(255,255,255,0.6); /* Mobile menu button shadow */
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.send-menu-btn:hover {
    background: var(--btn-hover-bg, linear-gradient(180deg, #ffffff 0%, #e9e9ea 100%));
    animation: border-glow-gold-green 2s infinite;
    transform: translateY(-1px);
    color: var(--btn-hover-text-color, #0b1220);
    border-color: var(--btn-hover-border-color, #f59e0b);
}
.send-menu-btn:active {
    transform: translateY(0);
    border-color: #ff0000 !important;
    box-shadow: 0 0 10px #ff0000 !important;
    animation: none;
}
.send-menu-btn:focus {
    outline: 3px solid rgba(178,242,187,0.28);
    outline-offset: 2px;
}

/* New class for buttons that should look like menu items */
.menu-item-button {
    display: flex; /* Changed to flex */
    align-items: center; /* Vertically center content */
    justify-content: center; /* Horizontally center content */
    height: 40px; /* Set button height to 40px */
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #e9e9ea 100%);
    border: 1px solid rgba(0,0,0,0.08);
    color: #006DBF; /* Default text color */
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,0.6);
    transition: all 0.2s ease-in-out;
    text-align: center;
    text-decoration: none;
}

.menu-item-button:hover {
    background: linear-gradient(180deg, #ffffff 0%, #e9e9ea 100%);
    animation: border-glow-gold-green 2s infinite;
    transform: translateY(-1px);
    color: #0b1220; /* Changed to dark text on hover */
    border-color: #f59e0b;
}

.menu-item-button:active {
    transform: translateY(0);
    border-color: #ff0000 !important;
    box-shadow: 0 0 10px #ff0000 !important;
    animation: none;
}

/* Global Input/Select/Textarea Styling to match Plan Cards */
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="radio"]:hover,
input[type="file"]:hover,
textarea:hover,
select:hover {
    animation: border-glow-gold-green 2s infinite;
    border-color: #f59e0b !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="radio"]:focus,
input[type="file"]:focus,
textarea:focus,
select:focus {
    border-color: #ff0000 !important;
    box-shadow: 0 0 10px #ff0000 !important;
    outline: none !important;
    animation: none;
}

/* Ensure radio buttons active state is also red */
input[type="radio"]:active {
    border-color: #ff0000 !important;
    box-shadow: 0 0 10px #ff0000 !important;
    animation: none;
}

/* Payment Option Card Styling */
.payment-option-card {
    background: linear-gradient(180deg, #ffffff 0%, #e9e9ea 100%);
    border: 1px solid rgba(0,0,0,0.08); /* Default border matching menu-item-button */
    border-radius: 0.5rem; /* rounded-lg equivalent */
    padding: 1rem; /* p-4 equivalent */
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-option-card:hover {
    animation: border-glow-gold-green 2s infinite;
}

.payment-option-card:active {
    border-color: #ff0000 !important;
    box-shadow: 0 0 10px #ff0000 !important;
    animation: none;
}

/* Specific style for disabled menu item button (e.g., "Current Plan") */
.menu-item-button-disabled {
    background: #e2e8f0; /* Light gray background */
    color: #6b7280; /* Darker gray text */
    border-color: rgba(0,0,0,0.05);
    cursor: not-allowed;
    opacity: 0.75;
    box-shadow: none; /* No shadow for a flatter disabled look */
    pointer-events: none; /* Prevent clicks */
}

.menu-item-button-disabled:hover {
    background: #e2e8f0; /* Keep same background on hover */
    color: #6b7280; /* Keep same text color on hover */
    transform: translateY(0); /* No hover animation */
    box-shadow: none; /* No hover shadow */
}

/* Top loading bar styles */
#page-loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 999999;
  pointer-events: none;
  background: transparent;
}
#page-loading-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--page-loading-bar-color, #f59e0b); /* Use CSS variable, fallback to default */
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: width 150ms linear, opacity 220ms ease;
  will-change: width, opacity;
}

:root {
    --color-primary-blue: #006DBF;
    --text-shadow-light: -1px -1px 0 #f8f8f8, 1px -1px 0 #f8f8f8, -1px 1px 0 #f8f8f8, 1px 1px 0 #f8f8f8;
    /* New CSS variables for link styling */
    --link-default-color: #000000;
    --link-hover-color: #FFD700;
    --link-click-color: #006DBF;
    /* Removed --cassandra-link-default-color, --cassandra-link-hover-color, --cassandra-link-click-color */
    --link-text-shadow-color: #b2f2bb;
}

/* Custom font family */
.font-neuropol {
    font-family: 'Neuropol', sans-serif;
}

/* Custom text color */
.text-primary-blue {
    color: var(--color-primary-blue) !important;
}

.text-default-color {
    color: var(--default-text-color, #000000) !important;
}

/* Custom text shadow */
.text-shadow-light {
    text-shadow: var(--text-shadow-light);
}

.text-larger {
    font-size: larger;
}

.text-white-shadow-strong {
    color: #ffffff !important;
    text-shadow: -1px -1px 0 #000000, 1px -1px 0 #000000, -1px 1px 0 #000000, 1px 1px 0 #000000;
}

.bg-ourphysics {
    background-image: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url('../images/pic-1.png');
    background-size: cover;
    background-position: center;
}

.bg-services-intro {
    background-image: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('../images/1-3pic-1.png');
    background-size: cover;
    background-position: center;
}

/* Contact section background */
.contact-bg-image {
    background-image: url('../images/hero-5-img2-1-1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Contact info card background */
.contact-info-card-bg {
    background-image: linear-gradient(rgba(255,255,255,0.86), rgba(255,255,255,0.86)), url('../images/cassandra-tlogo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.app-link-style {
    color: var(--link-default-color);
    text-shadow: 1px 1px 0px var(--link-text-shadow-color), -1px -1px 0px var(--link-text-shadow-color), 1px -1px 0px var(--link-text-shadow-color), -1px 1px 0px var(--link-text-shadow-color);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.app-link-style:hover {
    color: var(--link-hover-color);
    text-shadow: none;
}

.app-link-style:active {
    color: var(--link-click-color);
}

/* Removed .app-cassandra-link-style and its rules */

.logo-img-link {
    background: transparent;
    border: none;
    display: inline-block;
}

.logo-img {
    background: transparent;
    border: none;
}

.logo-glow {
    filter: drop-shadow(0 0 10px #b2f2bb);
    transition: filter 0.3s ease-in-out;
}

.logo-glow:hover {
    filter: drop-shadow(0 0 10px #ffadad);
}


.logo-text-style {
    background: transparent;
    border: none;
    display: inline-block;
    padding: 0;
    margin: 0;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
    color: black;
}

#mobileDisclaimerLink {
    color: var(--cassandra-link-default-color) !important; /* This will now use --link-default-color or be overridden */
}

#mobileDisclaimerLink:hover {
    color: var(--cassandra-link-hover-color) !important; /* This will now use --link-hover-color or be overridden */
}

#mobileDisclaimerLink:active {
    color: var(--link-click-color) !important; /* This will now use --link-click-color or be overridden */
}

/* Adjust mainpagetxt position */
#mainpagetxt {
    position: relative;
    /* top: -50px; */ /* Removed to match bannertest.php behavior */
}

.responsive-img-square {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

/* Team Card Hover Effect */
@keyframes team-glow {
    0% { box-shadow: 0 0 5px var(--logo-digit-color); border-color: var(--logo-digit-color); }
    50% { box-shadow: 0 0 20px var(--logo-digit-color); border-color: var(--logo-digit-color); }
    100% { box-shadow: 0 0 5px var(--logo-digit-color); border-color: var(--logo-digit-color); }
}

.pro-glass-card:hover .team-photo {
    animation: team-glow 1.5s infinite;
    border: 3px solid var(--logo-digit-color);
}

.team-photo {
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

/* Plan Card Styling */
@keyframes border-glow-gold-green {
    0% {
        box-shadow: 0 0 5px #f59e0b;
        border-color: #f59e0b;
    }
    50% {
        box-shadow: 0 0 15px #b2f2bb;
        border-color: #b2f2bb;
    }
    100% {
        box-shadow: 0 0 5px #f59e0b;
        border-color: #f59e0b;
    }
}

@keyframes border-glow-green {
    0% {
        box-shadow: 0 0 5px #b2f2bb;
        border-color: #b2f2bb;
    }
    50% {
        box-shadow: 0 0 15px #b2f2bb;
        border-color: #b2f2bb;
    }
    100% {
        box-shadow: 0 0 5px #b2f2bb;
        border-color: #b2f2bb;
    }
}

.plan-card-style {
    background: linear-gradient(180deg, #ffffff 0%, #e9e9ea 100%);
    border: 1px solid #f59e0b;
    border-radius: 0.75rem; /* rounded-xl equivalent */
    transition: all 0.3s ease;
}

.plan-card-style:hover {
    animation: border-glow-green 2s infinite;
    border-color: #b2f2bb !important;
}

.plan-card-style:active, .plan-card-style:focus-within {
    border-color: #ff0000 !important;
    box-shadow: 0 0 10px #ff0000 !important;
    animation: none;
}

/* Top Up Amount Button Styling */
.topup-amount-btn:hover {
    border-color: #ff0000 !important;
    box-shadow: 0 0 10px #ff0000 !important;
    animation: none;
}

.topup-amount-btn.active {
    border-color: #ff0000 !important;
    box-shadow: 0 0 10px #ff0000 !important;
    animation: none;
    background-color: #eff6ff; /* Optional: keep subtle background to indicate selection */
}

/* Styles from original pages/avcformulae.php */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(200, 200, 200, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Neuropol', 'Neuropol-2', sans-serif;
    font-size: 25px;
    color: #f59e0b;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Ensure menu title uses Neuropol font */
.menu-wrapper .logo a {
    font-family: 'Neuropol', sans-serif !important;
}
.menu-wrapper .logo a span {
    font-family: 'Neuropol', sans-serif !important;
}

body {
    margin: 0;
    padding: 0; /* Remove global padding from body */
    background-color: #e0e6ed; /* Changed for better contrast with glass card */
    color: #333;
    font-family: 'Neuropol-2', sans-serif;
}

/* Wrapper for avcformulae.php content to apply consistent margins */
.avc-content-wrapper {
    padding-left: 20px;
    padding-right: 20px;
}
.fa-window-maximize {
    text-shadow: 2px 2px 4px #000000;
}
div[onclick^="toggleCard"] {
    right: 8px !important;
}
div[onclick^="toggleGlobalControls"] {
    right: 8px !important;
}
h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-family: 'Neuropol', 'Neuropol-2', sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.global-controls {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 30px;
    position: sticky;
    top: 10px;
    z-index: 100;
    position: relative;
	transition: max-height 0.3s ease-out;
	overflow: hidden;
}
.global-title {
    font-size: 20px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
}
.global-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.global-control-group {
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #e0e6ed;
}
.global-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #2c3e50;
}
.global-value {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin: 5px 0;
    color: #e74c3c;
}
input[type="range"], input[type="number"] {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 5px;
}
.formula-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}
.formula-card {
    width: 100%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 45px 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* Add this line */
}
.formula-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.formula-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}
.formula-equation {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    margin: 15px 0;
    border-left: 4px solid #3498db;
}
.local-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 20px 0;
    padding: 15px;
    background: #f0f5fa;
    border-radius: 8px;
    width: 100%;
}
.local-control-group {
    display: flex;
    flex-direction: column;
    flex: 1 1 200px;
    min-width: 160px;
    max-width: 100%;
}
.local-control-group input[type="range"],
.local-control-group input[type="number"] {
    width: 100%;
}
.local-label {
    font-size: 14px;
    margin-bottom: 5px;
    font-weight: 500;
}
.plot-container {
    width: 100%;
    max-width: 100%;
    height: 390px;
    margin-top: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
}
.plot-container .user-select-none.svg-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    margin: 0 auto !important;
    display: block !important;
}
#vancampen-plot,
#ashby-plot,
#gap-plot,
#landauer-plot,
#symbiosis-plot,
#social-plot,
#interdependence-plot,
#pfpp-plot {
    width: 100%;
    max-width: 100%;
    height: 390px;
}
.description {
    font-size: 14px;
    color: #555;
    margin-top: 15px;
    line-height: 1.5;
}

.formula-card.collapsed .formula-equation,
.formula-card.collapsed .local-controls,
.formula-card.collapsed .plot-container,
.formula-card.collapsed .description {
    display: none;
}

.formula-card.collapsed {
    max-height: 50px;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}
.global-controls.collapsed {
	max-height: 50px;
	overflow: hidden;
	transition: max-height 0.3s ease-out;
}
.tabs {
    display: flex;
    overflow-x: auto;
    margin-bottom: 20px;
    gap: 5px;
}
.tab {
    padding: 10px 20px;
    background: #e0e6ed;
    border-radius: 5px 5px 0 0;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}
.tab.active {
    background: #3498db;
    color: white;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.sync-toggle {
    display: flex;
    align-items: center;
    margin: 10px 0;
    padding: 10px;
    background: #e8f4fd;
    border-radius: 5px;
}
.sync-toggle input {
    margin-right: 10px;
}
.linked-indicator {
    font-size: 12px;
    color: #27ae60;
    font-weight: bold;
    margin-top: 5px;
}
@media (max-width: 1024px) {
    .global-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }
    .plot-container,
    #vancampen-plot,
    #ashby-plot,
    #gap-plot,
    #landauer-plot,
    #symbiosis-plot,
    #social-plot,
    #interdependence-plot,
    #pfpp-plot {
        height: 350px;
    }
}
@media (max-width: 768px) {
    .avc-content-wrapper {
        padding-left: 15px;
        padding-right: 15px;
    }
    .global-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .local-controls {
        flex-direction: column;
        gap: 12px;
    }
    .local-control-group {
        flex: 1 1 100%;
        min-width: 0;
    }
    .plot-container,
    #vancampen-plot,
    #ashby-plot,
    #gap-plot,
    #landauer-plot,
    #symbiosis-plot,
    #social-plot,
    #interdependence-plot,
    #pfpp-plot {
        height: 330px;
    }
}
@media (max-width: 640px) {
    .avc-content-wrapper {
        padding-left: 12px;
        padding-right: 12px;
    }
    .global-grid {
        grid-template-columns: 1fr;
    }
    .plot-container,
    #vancampen-plot,
    #ashby-plot,
    #gap-plot,
    #landauer-plot,
    #symbiosis-plot,
    #social-plot,
    #interdependence-plot,
    #pfpp-plot {
        height: 310px;
    }
}

/* Buttons for card actions (copy, download, preview) */
.card-action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.95);
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    cursor: pointer;
    margin-right: 4px;
    color: #1f2937;
    text-decoration: none;
    font-size: 14px;
}
.card-action-btn i { pointer-events: none; line-height: 1; }
/* Fullscreen card */
.formula-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 20000 !important;
    overflow: auto !important;
    padding: 24px !important;
    background: #ffffff;
}
/* Make plot taller when card is fullscreen */
.formula-fullscreen .plot-container {
    height: calc(100vh - 240px) !important;
    max-height: none !important;
}

/* Preview Button Style (based on send-menu-btn, but green) */
.preview-menu-btn {
    display: inline-block;
    height: 40px; /* Set button height to 40px */
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, #e6ffe6 0%, #d9f7d9 100%); /* Light green gradient */
    border: 1px solid rgba(34,197,94,0.3); /* Green border */
    color: #16a34a; /* Darker green text */
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0,0,0,0.18), inset 0 2px 0 rgba(255,255,255,0.6);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
    text-align: center;
    text-decoration: none; /* Ensure no underline */
}
.preview-menu-btn:hover {
    transform: translateY(-2px);
    background: rgba(178,242,187,0.95); /* Lighter green hover */
    color: #0b1220;
    box-shadow: 0 10px 18px rgba(0,0,0,0.22), inset 0 2px 0 rgba(255,255,255,0.72);
}
.preview-menu-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.5);
}
.preview-menu-btn:focus {
    outline: 3px solid rgba(178,242,187,0.28);
    outline-offset: 2px;
}

/* Download Button Style (based on send-menu-btn, but blue) */
.download-menu-btn {
    display: inline-block;
    height: 40px; /* Set button height to 40px */
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: linear-gradient(180deg, #e6f2ff 0%, #d9e9f7 100%); /* Light blue gradient */
    border: 1px solid rgba(0,109,191,0.3); /* Blue border */
    color: #006DBF; /* Darker blue text */
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(0,0,0,0.18), inset 0 2px 0 rgba(255,255,255,0.6);
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
    text-align: center;
    text-decoration: none; /* Ensure no underline */
}
.download-menu-btn:hover {
    transform: translateY(-2px);
    background: rgba(178,210,242,0.95); /* Lighter blue hover */
    color: #0b1220;
    box-shadow: 0 10px 18px rgba(0,0,0,0.22), inset 0 2px 0 rgba(255,255,255,0.72);
}
.download-menu-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 8px rgba(0,0,0,0.14), inset 0 1px 0 rgba(255,255,255,0.5);
}
.download-menu-btn:focus {
    outline: 3px solid rgba(178,210,242,0.28);
    outline-offset: 2px;
}

/* New class for hover effect on action buttons */
.hover-text-accent:hover {
    color: #f59e0b !important;
}

/* Recaptcha container */
.recaptcha-wrapper {
    margin: 4px;
    height: 82px;
}

/* Footer styles */
.full-width-footer {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100vw !important; /* Use viewport width */
    padding-top: 3rem !important; /* Equivalent to py-12 */
    padding-bottom: 1rem !important; /* Changed from 3rem to 1rem */
    position: relative !important; /* Keep in normal flow */
    left: 50% !important;
    transform: translateX(-50%) !important; /* Center using transform */
}

.footer-heading {
    font-family: 'Neuropol', sans-serif;
    color: #38ADF0;
}

.footer-link {
    color: #9ca3af; /* text-gray-400 */
    transition: color 0.15s ease-in-out;
}
.footer-link:hover {
    color: #f59e0b;
}

.footer-copyright {
    font-size: 9px;
}
/* Floating Ankh Icon Container */
.ankh-float-container {
    position: fixed;
    bottom: 1px;
    left: 0px;
    z-index: 9999;
    background-color: transparent;
    border-radius: 50%;
    padding: 0; /* Remove padding */
    box-shadow: none;
    display: flex; /* Use flexbox to center content */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
}

.ankh-button {
    position: relative;
    top: 0; /* Remove top offset, let flexbox handle centering */
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.ankh-button .fa-ankh {
    font-size: 15px;
    color: #C04040;
    transition: color 0.3s ease;
}

.ankh-button:hover .fa-ankh {
    color: #006DBF;
}

.ankh-button .fa-ankh::before {
    content: "\f644";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.ankh-icon-glow {
    color: #C04040;
    animation: heartbeat-glow 1.5s infinite ease-in-out;
}

@keyframes heartbeat-glow {
    0% {
        filter: drop-shadow(0 0 4px #C04040);
    }
    50% {
        filter: drop-shadow(0 0 16px #C04040);
    }
    100% {
        filter: drop-shadow(0 0 4px #C04040);
    }
}

/* Replicating Tailwind Custom Colors classes used in userprofile.php */
.bg-primary-blue {
    background-color: var(--color-primary-blue) !important;
}

.border-primary-blue {
    border-color: var(--color-primary-blue) !important;
}

.ring-primary-blue {
    --tw-ring-color: var(--color-primary-blue) !important;
}

/* Focus states */
.focus\:ring-primary-blue:focus {
    --tw-ring-color: var(--color-primary-blue) !important;
}

.focus\:border-primary-blue:focus {
    border-color: var(--color-primary-blue) !important;
}

/* Peer states for toggles */
.peer:checked ~ .peer-checked\:bg-primary-blue {
    background-color: var(--color-primary-blue) !important;
}

/* For peer-focus:ring-primary-blue/50 */
.peer:focus ~ .peer-focus\:ring-primary-blue\/50 {
     --tw-ring-color: rgba(0, 109, 191, 0.5) !important;
}

/* Missing Tailwind classes for User Profile */
.w-11 {
    width: 2.75rem;
}

.top-0\.5 {
    top: 0.125rem;
}

.left-\[2px\] {
    left: 2px;
}

/* Violet colors */
.bg-violet-50 {
    background-color: #f5f3ff;
}

.text-violet-700 {
    color: #6d28d9;
}

.hover\:bg-violet-100:hover {
    background-color: #ede9fe;
}

/* File input styling */
.file\:mr-4::file-selector-button {
    margin-right: 1rem;
}

.file\:py-2::file-selector-button {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.file\:px-4::file-selector-button {
    padding-left: 1rem;
    padding-right: 1rem;
}

.file\:rounded-full::file-selector-button {
    border-radius: 9999px;
}

.file\:border-0::file-selector-button {
    border-width: 0;
}

.file\:text-sm::file-selector-button {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.file\:font-semibold::file-selector-button {
    font-weight: 600;
}

.file\:bg-violet-50::file-selector-button {
    background-color: #f5f3ff;
}

.file\:text-violet-700::file-selector-button {
    color: #6d28d9;
}

.hover\:file\:bg-violet-100:hover::file-selector-button {
    background-color: #ede9fe;
}

/* Additional missing Tailwind classes */
.min-h-screen {
    min-height: 100vh;
}

.space-x-6 > :not([hidden]) ~ :not([hidden]) {
    --tw-space-x-reverse: 0;
    margin-right: calc(1.5rem * var(--tw-space-x-reverse));
    margin-left: calc(1.5rem * (1 - var(--tw-space-x-reverse)));
}

.shrink-0 {
    flex-shrink: 0;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

.ring-4 {
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

.peer:focus ~ .peer-focus\:ring-4 {
    --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);
    box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
}

@media (min-width: 640px) {
    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.team-photo {
    width: 128px !important;
    height: 128px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}

/* Modal Backdrop Styles */
#s4a-modal-backdrop {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2147483647 !important;
}
#s4a-modal {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  /* background handled by pro-glass-card/inline style */
  /* border-radius handled by pro-glass-card */
  /* border handled by pro-glass-card */
  padding: 24px;
  text-align: left;
  font-family: 'IBM Plex Sans', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: #0b1220;
  display: flex;
  flex-direction: column;
}
#s4a-modal h4 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  font-weight: 700;
  flex-shrink: 0;
}
#s4a-modal p {
  margin: 0 0 16px 0;
  color: #20232a;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 10px;
}
#s4a-modal .s4a-ok {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 0.5rem;
  background: var(--btn-bg-color, linear-gradient(180deg, #ffffff 0%, #e9e9ea 100%));
  border: 1px solid var(--btn-border-color, rgba(0,0,0,0.14));
  color: var(--btn-text-color, #1e40af);
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 6px 12px var(--btn-shadow-color, rgba(0,0,0,0.18)), inset 0 2px 0 rgba(255,255,255,0.6);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  flex-shrink: 0;
  align-self: center;
}
#s4a-modal .s4a-ok:hover {
  transform: translateY(-2px);
  background: var(--btn-hover-bg, linear-gradient(180deg, #ffffff 0%, #e9e9ea 100%));
  animation: border-glow-gold-green 2s infinite;
  color: var(--btn-hover-text-color, #0b1220);
  border-color: var(--btn-hover-border-color, #f59e0b);
}
#s4a-modal.success .s4a-ok {
  background: #e6f9ef;
  border-color: rgba(34,197,94,0.25);
  box-shadow: 0 6px 18px rgba(34,197,94,0.12);
}

@media (max-width: 768px) {
  #s4a-modal {
    padding: 20px;
  }
}

/* Landscape optimization for small heights */
@media (orientation: landscape) and (max-height: 500px) {
  #s4a-modal {
    padding: 12px;
  }
  #s4a-modal h4 {
    margin-bottom: 8px;
    font-size: 1.25rem;
  }
  #s4a-modal p {
    margin-bottom: 8px;
  }
  #s4a-modal .s4a-ok {
    padding: 8px 20px;
  }
}
