:root {
    color-scheme: dark;
}

[data-theme="light"] {
    color-scheme: light;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="light"] body {
    background-color: #f8fafc;
    color: #0f172a;
}

[data-theme="light"] .text-slate-50,
[data-theme="light"] .text-slate-100 {
    color: #0f172a !important;
}

[data-theme="light"] .text-slate-200 {
    color: #1e293b !important;
}

[data-theme="light"] .text-slate-300 {
    color: #334155 !important;
}

[data-theme="light"] .text-slate-400 {
    color: #475569 !important;
}

[data-theme="light"] .text-slate-500 {
    color: #64748b !important;
}

[data-theme="light"] .text-slate-900,
[data-theme="light"] .text-slate-950 {
    color: #0b1120 !important;
}

[data-theme="light"] .bg-slate-950 {
    background-color: #ffffff !important;
}

[data-theme="light"] .bg-slate-950\/90 {
    background-color: rgba(15, 23, 42, 0.65) !important;
}

[data-theme="light"] .bg-slate-950\/80 {
    background-color: rgba(248, 250, 252, 0.9) !important;
}

[data-theme="light"] .bg-slate-950\/70 {
    background-color: rgba(248, 250, 252, 0.85) !important;
}

[data-theme="light"] .bg-slate-950\/60 {
    background-color: rgba(248, 250, 252, 0.75) !important;
}

[data-theme="light"] .bg-slate-900 {
    background-color: #f8fafc !important;
}

[data-theme="light"] .bg-slate-900\/80 {
    background-color: rgba(255, 255, 255, 0.92) !important;
}

[data-theme="light"] .bg-slate-900\/70 {
    background-color: rgba(255, 255, 255, 0.88) !important;
}

[data-theme="light"] .bg-slate-900\/60 {
    background-color: rgba(255, 255, 255, 0.82) !important;
}

[data-theme="light"] .bg-slate-900\/50 {
    background-color: rgba(255, 255, 255, 0.75) !important;
}

[data-theme="light"] .bg-slate-900\/40 {
    background-color: rgba(255, 255, 255, 0.68) !important;
}

[data-theme="light"] .bg-slate-900\/30 {
    background-color: rgba(255, 255, 255, 0.6) !important;
}

[data-theme="light"] .border-slate-800,
[data-theme="light"] .border-slate-800\/80,
[data-theme="light"] .border-slate-800\/70,
[data-theme="light"] .border-slate-800\/60,
[data-theme="light"] .border-slate-800\/40,
[data-theme="light"] .border-slate-700 {
    border-color: rgba(148, 163, 184, 0.35) !important;
}

[data-theme="light"] .border-slate-700 {
    border-color: rgba(148, 163, 184, 0.4) !important;
}

[data-theme="light"] .bg-gradient-to-br.from-slate-900\/70 {
    --tw-gradient-from: rgba(148, 163, 184, 0.25) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(148, 163, 184, 0));
}

[data-theme="light"] .via-slate-950 {
    --tw-gradient-stops: var(--tw-gradient-from), #e2e8f0, var(--tw-gradient-to, rgba(226, 232, 240, 0)) !important;
}

[data-theme="light"] .to-slate-950 {
    --tw-gradient-to: #e2e8f0 !important;
}

[data-theme="light"] .shadow-black\/20,
[data-theme="light"] .shadow-black\/30,
[data-theme="light"] .shadow-black\/40 {
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12) !important;
}

[data-theme="light"] .bg-slate-900\/80.text-slate-200,
[data-theme="light"] .bg-slate-900\/70.text-slate-200 {
    color: #1e293b !important;
}

[data-theme="light"] .bg-slate-900\/80 a,
[data-theme="light"] .bg-slate-900\/70 a {
    color: inherit;
}

.rx-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(30, 41, 59, 0.65);
    border-radius: 1rem;
    box-shadow: 0 24px 48px rgba(2, 6, 23, 0.45);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.rx-wrapper:hover {
    transform: translateY(-4px);
    border-color: rgba(100, 231, 148, 0.6);
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 30px 60px rgba(12, 25, 45, 0.5);
}

.rx-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #64E794;
    letter-spacing: 0.05em;
    margin: 0;
    text-align: left;
    font-size: 0.95rem;
}

.rx-frame {
    width: 100%;
    height: 540px;
    border: none;
    border-radius: 0.5rem;
    background: #fdf7e8; /* inverts to #020817 when dark theme filter is applied */
    filter: invert(1) hue-rotate(180deg);
    transition: filter 0.3s ease;
}

[data-theme="light"] .rx-wrapper {
    background: rgba(248, 250, 252, 0.95);
    border-color: rgba(148, 163, 184, 0.45);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.12);
}

[data-theme="light"] .rx-wrapper:hover {
    background: rgba(241, 245, 249, 0.98);
    border-color: rgba(30, 64, 175, 0.4);
    box-shadow: 0 28px 56px rgba(148, 163, 184, 0.18);
}

[data-theme="light"] .rx-label {
    color: #1d4ed8;
}

[data-theme="light"] .rx-frame {
    background: rgba(248, 250, 252, 0.98);
    filter: none;
}

[data-theme="light"] .text-primary {
    color: #166534 !important;
}

[data-theme="light"] .bg-primary {
    background-color: #15803d !important;
}

[data-theme="light"] .bg-primary\/10 {
    background-color: rgba(21, 128, 61, 0.12) !important;
}

[data-theme="light"] .bg-primary\/5 {
    background-color: rgba(21, 128, 61, 0.08) !important;
}

[data-theme="light"] .border-primary\/40 {
    border-color: rgba(21, 128, 61, 0.4) !important;
}

[data-theme="light"] .border-primary\/50 {
    border-color: rgba(21, 128, 61, 0.5) !important;
}

[data-theme="light"] .border-primary\/60 {
    border-color: rgba(21, 128, 61, 0.6) !important;
}
