:root {
    --header-text-color: #485C6E;
    --color-grey-50: #F1F1F1;
    --color-grey-300: #A0A0A0;
    --color-grey-700: #505050;
    /* --color-primary-light: #3B82F6; */
    --color-primary-light: #265BAA;
    --color-primary-dark: #265BAA;
    /* --color-blue-500: #EFF6FF; */
    --color-danger: #EF4444;
    --color-success: #10B981;
    --color-warning: #F59E0B;
}


body {
    font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.main-content-wrapper {
    padding: 1.5rem;
}

.content-container {
    background-color: white;
    border: 1px solid var(--color-grey-50);
    box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.header-title {
    font-size: clamp(1.5rem, 2vw + 1rem, 2rem);
    font-weight: 700;
    color: var(--header-text-color);
}

.header-desc {
    font-size: clamp(0.875rem, 1vw + 0.25rem, 1rem);
    font-weight: 400;
    color: var(--header-text-color);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 500px;
}

/* Main Container */
.compare-container {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Toolbar */
.toolbar {
    background: #F8FAFC;
    border-bottom: 1px solid var(--color-grey-50);
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    gap: 0.75rem;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0;
    background: white;
    color: var(--color-grey-700);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.toolbar-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.toolbar-btn.primary {
    background: var(--color-primary-light);
    color: white;
    border-color: var(--color-primary-light);
}

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

/* .toolbar-btn.danger {
    background: var(--color-danger);
    color: white;
    border-color: var(--color-danger);
} */

.toolbar-btn.danger:hover {
    /* background: #f2b3b3; */
    /* border-color: #dc2626; */
    color: #dc2626;
    /* background-color: rgba(239, 68, 68, 0.08); */
}

/* .toolbar-btn.danger:hover {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
    transition: all 0.25s ease;
} */

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #c3c4c5;
    border-radius: 8px;
    color: var(--color-grey-700);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
    /* background: #265BAA10; */
    background: #EBF6FA;
    color: #265BAA;
    border-color: #c3c4c5;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Compare Panels */
.compare-panels {
    display: grid;
    grid-template-columns: 1fr;
    /* min-height: 500px; */
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
}

#original-panels {
    display: flex;
    width: 100%;
}

.panel {
    flex: 1;
    border: none;
    background: white;
    display: flex;
    flex-direction: column;
}

.panel:first-child {
    border-right: 1px solid var(--color-grey-200);
}

.panel-header {
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-grey-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.panel-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-grey-700);
}

.panel-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-secondary {
    border: 1px solid var(--color-grey-50);
    box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.12);
    width: 2.5rem;
    height: auto;
    background-color: white;
    color: #485C6E;
    transition: all 0.2s ease;
    cursor: pointer;
    border-radius: 0.375rem;
}

/* Hover state */
.btn-secondary:hover:not(:disabled) {
    background-color: #F9FAFB;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
    border-color: #E5E7EB;
}

.btn-secondary:disabled {
    background-color: #F5F5F5;
    color: #A1A1AA;
    border-color: #E5E5E5;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.6;
}

.text-area {
    flex: 1;
    width: 100%;
    border: none;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    outline: none;
    background: white;
}

.text-display {
    flex: 1;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-y: auto;
    background: white;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Diff Highlighting */
/* .diff-added {
    background-color: #dcfce7;
    color: #166534;
    text-decoration: none;
}

.diff-removed {
    background-color: #fef2f2;
    color: #dc2626;
    text-decoration: line-through;
}

.diff-modified {
    background-color: #fef3c7;
    color: #d97706;
} */

/* Separator */
.separator {
    width: 2px;
    background: var(--color-grey-50);
    display: none;
}

/* Stats Bar */
.stats-bar {
    background: #f8fafc;
    border-top: 1px solid var(--color-grey-50);
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.stats-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.credits-row {
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

.credits-text {
    font-size: 0.8rem;
    color: #6c757d;
}

.credits-link {
    color: var(--color-primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.credits-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-grey-700);
}

.stat-value {
    font-weight: 600;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid var(--color-primary-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Mobile Styles */
@media (max-width: 767px) {
    .main-content-wrapper {
        padding: 1rem;
    }

    .toolbar {
        padding: 0.75rem;
    }

    .toolbar-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .compare-panels {
        /* min-height: 400px; */
    }

    .text-area,
    .text-display {
        font-size: 13px;
        padding: 0.75rem;
    }

    .stats-bar {
        font-size: 0.8rem;
        padding: 0.5rem;
        gap: 0.75rem;
    }

    .stats-row {
        gap: 0.75rem;
    }

    .credits-row {
        padding-top: 0.4rem;
    }

    .credits-text {
        font-size: 0.75rem;
    }

    .toolbar {
        justify-content: space-between;
    }

    .toolbar-btn span {
        display: none;
    }

    .panel-header {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1023px) {
    .compare-panels {
        grid-template-columns: 1fr;
        /* min-height: 450px; */
    }
    
    .toolbar-btn span {
        font-size: 10px;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .compare-panels {
        /* grid-template-columns: 1fr 2px 1fr; */
        grid-template-columns: 1fr;
        /* min-height: 600px; */
    }

    .separator {
        display: block;
    }

    .toolbar {
        justify-content: space-between;
        padding: 1.25rem;
    }
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

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

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


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

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

.fade-in {
    animation: fadeIn 0.3s ease-out;
}