:root {
    /* Light Theme (Default) */
    --primary-color: #ff9515;
    --secondary-color: #e6850e;
    --accent-color: #ffaa33;

    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-tertiary: #9ca3af;

    --bg-body: #f3f4f6;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f9fafb;

    --border-color: #e5e7eb;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    --success-bg: #d1fae5;
    --success-text: #065f46;

    --error-color: #ef4444;
    --error-bg: #fee2e2;
    --error-text: #991b1b;

    --warning-color: #f59e0b;
    --warning-bg: #fef3c7;
    --warning-text: #92400e;

    --echo-bg: #dbeafe;
    --echo-text: #1e40af;

    --music-bg: #fce7f3;
    --music-text: #9f1239;

    --cli-bg: #e0e7ff;
    --cli-text: #3730a3;

    /* Footer */
    --footer-bg: #111827;
    --footer-text: #f3f4f6;
}

[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;

    --bg-body: #111827;
    /* Darker background */
    --bg-surface: #1f2937;
    /* Slightly lighter surface */
    --bg-surface-alt: #374151;

    --border-color: #374151;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);

    /* Adjust badge colors for dark mode readability if needed,
       but keeping them light-bg/dark-text is often okay for badges.
       Let's slightly dim the backgrounds or ensure contrast. */

    --footer-bg: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-body);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 20px 40px;
    /* Adjusted padding */
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    /* For toggle positioning */
}

/* Theme Toggle Button */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
    backdrop-filter: blur(4px);
    color: white;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

header h1 {
    font-size: 3.5rem;
    /* Larger */
    font-weight: 800;
    /* Bolder */
    margin-bottom: 10px;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.02em;
}

header p {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

main {
    padding: 40px 20px 80px;
}

/* Sections */
.intro-section,
.section {
    background: var(--bg-surface);
    border-radius: 16px;
    /* Rounder corners */
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.intro-section {
    text-align: center;
    padding: 60px 40px;
    margin-top: 60px;
}

.intro-section h2 {
    font-size: 2.25rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Main Call to Action */
.main-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 24px 48px;
    border-radius: 16px;
    font-size: 2.25rem;
    font-weight: 700;
    text-decoration: none;
    margin: 30px 0 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-md);
    letter-spacing: -0.01em;
}

.main-number:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.section h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 25px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h2::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin-left: 15px;
    opacity: 0.5;
}

.section p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-surface);
}

thead {
    background: var(--bg-surface-alt);
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

th {
    padding: 16px 24px;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: var(--bg-surface-alt);
}

.phone-number {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    color: var(--text-primary);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    /* Pill shape */
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.badge-echo {
    background-color: var(--echo-bg);
    color: var(--echo-text);
}

.badge-dtmf {
    background-color: var(--warning-bg);
    color: var(--warning-text);
}

.badge-milliwatt {
    background-color: var(--success-bg);
    color: var(--success-text);
}

.badge-music {
    background-color: var(--music-bg);
    color: var(--music-text);
}

.badge-cli {
    background-color: var(--cli-bg);
    color: var(--cli-text);
}

.error-table td:first-child .phone-number {
    color: var(--error-color);
    font-weight: 700;
}

/* Note Box */
.note {
    background: var(--warning-bg);
    border-left: 4px solid var(--warning-color);
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 4px;
    color: var(--warning-text);
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 20px;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.footer-logo {
    width: 180px;
    /* Explicit width to ensure visibility */
    height: auto;
    display: block;
    /* Ensure it takes up space */
    opacity: 0.9;
    transition: opacity 0.2s;
}

.footer-logo:hover {
    opacity: 1;
}

/* Force logo colors in footer */
.footer-logo .st1 {
    fill: #ffffff !important;
}

.footer-logo .st0 {
    fill: #ff9515 !important;
}

.powered-by {
    color: var(--text-tertiary);
}

.powered-by a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.powered-by a:hover {
    text-decoration: underline;
}

/* SVG Fill fixes for dark mode in footer */
.st1 {
    fill: #ffffff !important;
}

/* Make speakup logo white in footer */
footer .st0 {
    fill: #ff9515 !important;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    .main-number {
        font-size: 1.5rem;
        padding: 20px 30px;
    }

    .intro-section,
    .section {
        padding: 25px;
    }

    th,
    td {
        padding: 12px 15px;
    }
}%
