/* ============================================
   THEME TOGGLE - QA Guide
   Premium Light/Dark Theme Switcher
   ============================================ */

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 12px 40px rgba(56, 189, 248, 0.3),
        0 0 20px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Icon transitions */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.theme-toggle .icon-moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Light theme icon states */
[data-theme="light"] .theme-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

[data-theme="light"] .theme-toggle .icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

/* ============================================
   LIGHT THEME VARIABLES
   ============================================ */
[data-theme="light"] {
    --bg-color: #f8fafc;
    --surface-color: rgba(255, 255, 255, 0.9);
    --surface-border: rgba(0, 0, 0, 0.1);
    --primary-accent: #0ea5e9;
    --primary-glow: rgba(14, 165, 233, 0.2);
    --secondary-accent: #06b6d4;
    --success-accent: #22c55e;
    --warning-accent: #f59e0b;
    --danger-accent: #ef4444;
    --text-main: #0f172a;
    --text-dim: #64748b;
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1);
}

/* Light theme body */
[data-theme="light"] body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    color: var(--text-main);
}

/* Light theme header glow */
[data-theme="light"] header::before {
    background: var(--primary-glow);
    opacity: 0.3;
}

/* Light theme header title */
[data-theme="light"] header h1 {
    background: linear-gradient(to right, #0f172a, #0ea5e9, #06b6d4) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

/* Light theme cards */
[data-theme="light"] .test-card {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .test-card::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, transparent 100%) !important;
}

[data-theme="light"] .test-card:hover {
    border-color: rgba(14, 165, 233, 0.4) !important;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15),
        0 0 20px rgba(14, 165, 233, 0.1) !important;
}

/* Light theme section header */
[data-theme="light"] .section-header h2 {
    color: #0f172a !important;
}

[data-theme="light"] .section-header::after {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.15), transparent) !important;
}

/* Light theme card content */
[data-theme="light"] .test-card-header h3 {
    color: #0f172a !important;
}

[data-theme="light"] .test-card-description {
    color: #475569 !important;
}

/* Light theme tags */
[data-theme="light"] .scope-item {
    background: rgba(14, 165, 233, 0.1) !important;
    color: #0284c7 !important;
    border-color: rgba(14, 165, 233, 0.2) !important;
}

[data-theme="light"] .tag-active {
    background-color: rgba(34, 197, 94, 0.1) !important;
    color: #16a34a !important;
    border-color: rgba(34, 197, 94, 0.2) !important;
}

[data-theme="light"] .tag-new {
    background-color: rgba(14, 165, 233, 0.1) !important;
    color: #0284c7 !important;
    border-color: rgba(14, 165, 233, 0.2) !important;
}

[data-theme="light"] .tag-coming {
    background-color: rgba(245, 158, 11, 0.1) !important;
    color: #d97706 !important;
    border-color: rgba(245, 158, 11, 0.2) !important;
}

/* Light theme button */
[data-theme="light"] .btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3) !important;
}

[data-theme="light"] .btn:hover {
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.4) !important;
}

/* Light theme toggle button */
[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05) inset;
    color: #f59e0b;
}

[data-theme="light"] .theme-toggle:hover {
    box-shadow: 0 12px 40px rgba(245, 158, 11, 0.3),
        0 0 20px rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.4);
}

/* ============================================
   LIGHT THEME - PAGE SPECIFIC STYLES
   ============================================ */

/* Navigation buttons */
[data-theme="light"] .nav-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

[data-theme="light"] .nav-btn:hover {
    background: var(--primary-accent);
    color: white;
}

/* Back to home link */
[data-theme="light"] .back-home {
    color: var(--primary-accent);
}

[data-theme="light"] .back-home:hover {
    color: var(--secondary-accent);
}

/* Test list items */
[data-theme="light"] .test-list li {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

/* Form inputs */
[data-theme="light"] input,
[data-theme="light"] textarea,
[data-theme="light"] select {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-main);
}

[data-theme="light"] input:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] select:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Tables */
[data-theme="light"] table {
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] th {
    background: rgba(14, 165, 233, 0.1);
    color: var(--text-main);
}

[data-theme="light"] td {
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

[data-theme="light"] tr:hover td {
    background: rgba(14, 165, 233, 0.05);
}

/* Modals and overlays */
[data-theme="light"] .modal-content,
[data-theme="light"] .card,
[data-theme="light"] .panel {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Alerts and notifications */
[data-theme="light"] .alert,
[data-theme="light"] .notification,
[data-theme="light"] .toast {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

/* Code blocks */
[data-theme="light"] code {
    background: rgba(14, 165, 233, 0.1);
    color: #0369a1;
}

/* Selector Validator Light Theme */
[data-theme="light"] .sv-toggle-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .sv-panel {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .sv-input {
    background: rgba(248, 250, 252, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
    color: var(--text-main);
}

[data-theme="light"] .sv-tab {
    color: var(--text-dim);
}

[data-theme="light"] .sv-tab.active {
    background: var(--primary-accent);
    color: white;
}

/* ============================================
   LIGHT THEME - API TESTER PAGE
   ============================================ */

/* Page header */
[data-theme="light"] .page-header h1 {
    background: linear-gradient(to right, #0f172a, var(--primary-accent), var(--secondary-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .page-header p {
    color: var(--text-dim);
}

[data-theme="light"] .page-header::before {
    background: var(--primary-glow);
    opacity: 0.3;
}

/* Panels */
[data-theme="light"] .panel {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .panel-header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
    background: rgba(248, 250, 252, 0.5);
}

[data-theme="light"] .panel-header h2 {
    color: var(--text-main) !important;
}

[data-theme="light"] .panel-header .icon {
    opacity: 0.8;
}

/* Method/URL row */
[data-theme="light"] .method-select {
    background: rgba(248, 250, 252, 1) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: var(--text-main) !important;
}

[data-theme="light"] .method-select option {
    background: #ffffff;
    color: #0f172a;
}

[data-theme="light"] .url-input {
    background: rgba(248, 250, 252, 1) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: var(--text-main) !important;
}

[data-theme="light"] .url-input::placeholder {
    color: #94a3b8;
}

/* Tabs */
[data-theme="light"] .tabs {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .tab-btn {
    color: var(--text-dim);
}

[data-theme="light"] .tab-btn:hover {
    color: var(--text-main);
    background: rgba(14, 165, 233, 0.08);
}

[data-theme="light"] .tab-btn.active {
    color: var(--primary-accent);
    background: rgba(14, 165, 233, 0.12);
}

/* Editor/Textarea */
[data-theme="light"] .editor {
    background: rgba(248, 250, 252, 1) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #1e293b !important;
}

[data-theme="light"] .editor:focus {
    border-color: var(--primary-accent) !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15) !important;
}

[data-theme="light"] .editor::placeholder {
    color: #94a3b8;
}

/* Send Button */
[data-theme="light"] .send-btn {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

[data-theme="light"] .send-btn:hover {
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

/* Response Meta */
[data-theme="light"] .meta-item {
    background: rgba(248, 250, 252, 1);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .meta-label {
    color: var(--text-dim);
}

[data-theme="light"] .meta-value {
    color: var(--text-main);
}

/* Response Content */
[data-theme="light"] .response-content {
    background: rgba(248, 250, 252, 1) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #1e293b !important;
}

[data-theme="light"] .response-placeholder {
    color: var(--text-dim);
}

[data-theme="light"] .response-placeholder .icon {
    opacity: 0.4;
}

/* Copy Button */
[data-theme="light"] .copy-btn {
    background: rgba(14, 165, 233, 0.12);
    border-color: rgba(14, 165, 233, 0.25);
    color: #0284c7;
}

[data-theme="light"] .copy-btn:hover {
    background: rgba(14, 165, 233, 0.2);
}

/* Sample APIs */
[data-theme="light"] .sample-apis h3 {
    color: var(--text-main);
}

[data-theme="light"] .api-item {
    background: rgba(248, 250, 252, 1);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .api-item:hover {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.25);
}

[data-theme="light"] .api-url {
    color: var(--text-main);
}

[data-theme="light"] .api-desc {
    color: var(--text-dim);
}

[data-theme="light"] .api-method.get {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

[data-theme="light"] .api-method.post {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

[data-theme="light"] .api-method.put {
    background: rgba(14, 165, 233, 0.15);
    color: #0284c7;
}

[data-theme="light"] .api-method.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* JSON Syntax Highlighting Light Mode */
[data-theme="light"] .json-key {
    color: #0284c7;
}

[data-theme="light"] .json-string {
    color: #16a34a;
}

[data-theme="light"] .json-number {
    color: #d97706;
}

[data-theme="light"] .json-boolean {
    color: #7c3aed;
}

[data-theme="light"] .json-null {
    color: #dc2626;
}

/* Test Tips */
[data-theme="light"] .test-tips {
    background: rgba(14, 165, 233, 0.06);
    border-color: rgba(14, 165, 233, 0.15);
}

[data-theme="light"] .test-tips h3 {
    color: #0284c7;
}

[data-theme="light"] .test-tips li {
    color: var(--text-dim);
}

[data-theme="light"] .test-tips li::before {
    color: var(--primary-accent);
}

/* Back Home Button Light Mode */
[data-theme="light"] .back-home {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: var(--text-main) !important;
}

[data-theme="light"] .back-home:hover {
    color: var(--primary-accent) !important;
    border-color: var(--primary-accent) !important;
}

/* ============================================
   LIGHT THEME - ALL PAGES GENERAL
   ============================================ */

/* Container text */
[data-theme="light"] .container {
    color: var(--text-main);
}

/* All headings */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
    color: var(--text-main);
}

/* Paragraphs */
[data-theme="light"] p {
    color: var(--text-dim);
}

/* Labels */
[data-theme="light"] label {
    color: var(--text-main);
}

/* Links */
[data-theme="light"] a {
    color: var(--primary-accent);
}

[data-theme="light"] a:hover {
    color: var(--secondary-accent);
}

/* Lists */
[data-theme="light"] li {
    color: var(--text-main);
}

/* Strong/Bold */
[data-theme="light"] strong,
[data-theme="light"] b {
    color: var(--text-main);
}

/* Pre blocks */
[data-theme="light"] pre {
    background: rgba(248, 250, 252, 1);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1e293b;
}

/* Placeholders */
[data-theme="light"] ::placeholder {
    color: #94a3b8 !important;
}

/* ============================================
   SMOOTH TRANSITIONS
   ============================================ */
body,
.test-card,
.btn,
header h1,
.section-header h2,
.test-card-header h3,
.test-card-description,
.scope-item,
.tag,
.theme-toggle,
input,
textarea,
select,
table,
th,
td,
.modal-content,
.card,
.panel,
code,
.nav-btn,
.back-home,
.test-list li,
.sv-toggle-btn,
.sv-panel,
.sv-input,
.sv-tab,
.panel-header,
.editor,
.method-select,
.url-input,
.tab-btn,
.send-btn,
.meta-item,
.response-content,
.copy-btn,
.api-item,
.test-tips,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
li,
label,
pre {
    transition: background-color 0.4s ease,
        color 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}