/* =========================================
   1. GLOBAL LAYOUT & TYPOGRAPHY
   ========================================= */
:root {
    --st-blue: #0d6efd;
    --st-dark: #1e2832;
    --st-bg-light: #f8f9fa;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--st-bg-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1; /* Pushes footer to bottom */
}

a {
    text-decoration: none;
}

/* =========================================
   2. NAVBAR & BRANDING
   ========================================= */
.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.5px;
    font-size: 1.25rem;
}

.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* =========================================
   3. DASHBOARD & CARDS
   ========================================= */
.tool-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid #e9ecef;
    background: #fff;
    border-radius: 12px;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border-color: var(--st-blue);
}

.tool-icon {
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
}

/* =========================================
   4. MODALS (FLOATING VIEW)
   ========================================= */
.floating-modal-dialog {
    max-width: 95%;
    height: 90%;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-modal-content {
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* =========================================
   5. PAYLOAD DIFF FINDER (Highlighting)
   ========================================= */
/* Red for Deleted Lines (Left Side) */
.marker-delete {
    position: absolute;
    background-color: rgba(220, 53, 69, 0.2);
    border-bottom: 1px solid rgba(220, 53, 69, 0.5);
    z-index: 20;
}

/* Green for Added Lines (Right Side) */
.marker-insert {
    position: absolute;
    background-color: rgba(25, 135, 84, 0.2);
    border-bottom: 1px solid rgba(25, 135, 84, 0.5);
    z-index: 20;
}

/* Gray Hatched Pattern for "Spacer" (Empty Gaps) */
.marker-spacer {
    position: absolute;
    background-image: linear-gradient(45deg, #f1f1f1 25%, #e9ecef 25%, #e9ecef 50%, #f1f1f1 50%, #f1f1f1 75%, #e9ecef 75%, #e9ecef 100%);
    background-size: 20px 20px;
    opacity: 0.6;
    z-index: 20;
}

/* =========================================
   6. REGEX TESTER (Highlighting)
   ========================================= */
.marker-match {
    position: absolute;
    background-color: rgba(255, 215, 0, 0.4); /* Gold */
    border-bottom: 2px solid rgba(255, 215, 0, 0.8);
    z-index: 20;
}

/* =========================================
   7. DARK MODE OVERRIDES
   ========================================= */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .card, 
body.dark-mode .bg-light,
body.dark-mode .main-card {
    background-color: #1e1e1e !important;
    color: #fff;
    border-color: #333 !important;
}

body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .input-group-text {
    background-color: #2d2d2d;
    border-color: #444;
    color: #fff;
}

body.dark-mode .tool-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    border-color: #444;
}

body.dark-mode .text-muted {
    color: #adb5bd !important;
}

body.dark-mode .text-dark {
    color: #fff !important;
}

/* Diff Finder Dark Mode Colors */
body.dark-mode .marker-delete {
    background-color: rgba(220, 53, 69, 0.3);
}
body.dark-mode .marker-insert {
    background-color: rgba(25, 135, 84, 0.3);
}
body.dark-mode .marker-spacer {
    background-image: linear-gradient(45deg, #2c3034 25%, #212529 25%, #212529 50%, #2c3034 50%, #2c3034 75%, #212529 75%, #212529 100%);
    opacity: 0.4;
}

/* =========================================
   8. FOOTER
   ========================================= */
footer {
    margin-top: auto;
    font-size: 0.9rem;
}