:root {
    --primary: #FF0000;
    --primary-dark: #CC0000;
    --bg: #f4f4f5;
    --bg-card: #ffffff;
    --text: #18181b;
    --text-muted: #52525b;
    --success: #10b981;
    --error: #ef4444;
    --border: #e4e4e7;
    --font: 'Outfit', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.logo h1 {
    font-size: 2rem;
    font-weight: 600;
}

.logo span {
    color: var(--primary);
}

.logo p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

nav {
    display: flex;
    gap: 1rem;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.nav-btn.active,
.nav-btn:hover {
    color: var(--text);
    background-color: var(--bg-card);
}

/* Toggle Switch */
.sync-guard {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-right: 2rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--success);
}

input:checked+.slider:before {
    transform: translateX(20px);
}

.status-label {
    font-weight: 600;
    min-width: 30px;
}

.status-label.on {
    color: var(--success);
}

.status-label.off {
    color: var(--error);
}

/* Comparison Tool */
.comparison-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    max-width: 1000px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-box input {
    flex: 1;
}

.search-box .btn-primary {
    width: auto;
    padding: 0.75rem 2rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.source-column {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.source-column h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.125rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.data-group {
    margin-bottom: 1.25rem;
}

.data-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.data-group p {
    font-weight: 600;
}

.desc-box {
    font-size: 0.875rem;
    max-height: 150px;
    overflow-y: auto;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 0.75rem;
    border-radius: 0.25rem;
    word-break: break-all;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.stat-card h3 {
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 1.5rem;
    font-weight: 600;
}

.success {
    color: var(--success);
}

.error {
    color: var(--error);
}

/* History Table */
.history-section h2 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.table-container {
    background: var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th,
td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg);
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.875rem;
}

.history-table tbody tr:hover {
    background: var(--bg);
}

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

/* Forms */
.config-card,
.testing-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    max-width: 600px;
    margin: 0 auto;
}

h2 {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

input,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-family: var(--font);
    font-size: 1rem;
}

textarea {
    height: 100px;
    resize: vertical;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
    font-size: 1rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* Loader */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.hidden {
    display: none !important;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.results-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
}

.explorer-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    max-width: 1000px;
    margin: 0 auto;
}

.config-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.config-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--primary);
}

.day-chip {
    background: var(--bg-body);
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.day-chip:hover {
    border-color: var(--primary);
}

.day-chip input {
    margin: 0;
}

pre {
    font-family: monospace;
    font-size: 0.875rem;
    white-space: pre-wrap;
    color: var(--text-muted);
}

/* Store Grid */
.store-section {
    margin-bottom: 3rem;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.store-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.store-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
}

.store-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary);
}

.store-url {
    font-size: 0.85rem;
    color: var(--text-muted);
    word-break: break-all;
}

.store-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-top: auto;
}

.store-status {
    padding: 0.2rem 1rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-enabled {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-disabled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.store-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.store-actions span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.mini-switch {
    width: 40px !important;
    height: 20px !important;
}

.mini-switch .slider:before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
}