/* --- Egns Toolkit Base (Universal Colors) --- */
:root {
    /* Define non-theme-dependent variables */
    --egns-accent: #a356ff; /* More Vivid Purple/Violet Accent */
    --egns-accent-hover: #913ff2;
    --egns-success: #10b981; /* Green for Pros */
    --egns-error: #ef4444; /* Red for Cons */
    
    /* Theme-dependent fallbacks (will be overridden by theme variables if defined) */
    --egns-theme-text: var(--text-color, #1a1a1a); 
    --egns-theme-text-muted: var(--text-color, #666666);
    --egns-theme-bg-card: var(--white-color, #ffffff);
    --egns-theme-border: var(--borderr-color, #e0e0e0);
}

body.dark {
    --egns-theme-text: var(--title-color, #ffffff); /* Fallback to theme dark title/text color */
    --egns-theme-text-muted: var(--text-color-white, #cccccc);
    --egns-theme-bg-card: var(--dark-primary-color, #1e1e1e);
    --egns-theme-border: #333333;
}


/* --- Global Container Reset --- */
.egns-comp-grid, .egns-pc-box, .egns-verdict-box, .egns-smart-copy {
    color: var(--egns-theme-text); /* Use dynamic text color */
    font-family: inherit;
}

/* 1. Comparison Grid */
.egns-comp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.egns-comp-item {
    background: var(--egns-theme-bg-card);
    border: 1px solid var(--egns-theme-border);
    border-radius: 12px;
    padding: 0 0 25px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* Lighter shadow for universal use */
}
body.dark .egns-comp-item { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); }

.egns-comp-item:hover { 
    transform: translateY(-5px); 
    border-color: var(--egns-accent);
}

.egns-comp-badge {
    background: linear-gradient(90deg, #7c3aed, var(--egns-accent));
    color: #fff;
    padding: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.egns-comp-img-wrap {
    width: 80px; height: 80px;
    background: var(--egns-theme-border); /* Light Gray background for icon/image wrapper */
    border-radius: 16px;
    margin: 20px auto 15px;
    display: flex; align-items: center; justify-content: center;
    padding: 10px;
    border: 1px solid var(--egns-theme-border);
}
body.dark .egns-comp-img-wrap { background: var(--egns-theme-border); }

.egns-comp-img-wrap img { max-width: 100%; height: auto; }
.egns-placeholder { font-size: 30px; font-weight: bold; color: var(--egns-theme-text-muted); }

.egns-comp-item h3 { color: var(--egns-theme-text); font-size: 22px; margin: 10px 0; }
.egns-comp-item p { color: var(--egns-theme-text-muted); font-size: 15px; padding: 0 20px; margin-bottom: 25px; line-height: 1.6; }

.egns-comp-btn {
    display: block; width: 80%; margin: 0 auto 10px;
    background: var(--egns-accent); color: #fff; font-weight: 700;
    padding: 14px; border-radius: 8px; text-decoration: none;
    transition: 0.3s; box-shadow: 0 5px 15px rgba(163, 86, 255, 0.3);
}
.egns-comp-btn:hover { background: var(--egns-accent-hover); }

.egns-link-btn { color: var(--egns-theme-text-muted); font-size: 14px; text-decoration: none; }
.egns-link-btn:hover { color: var(--egns-theme-text); text-decoration: underline; }


/* 2. Copy Box */
.egns-smart-copy {
    background: var(--egns-theme-bg-card); /* Use theme card background */
    border: 1px solid var(--egns-theme-border);
    border-radius: 8px; margin: 30px 0; position: relative;
    color: var(--egns-theme-text);
}
body.dark .egns-smart-copy { background: #1a1a1a; border-color: #333; }

.egns-copy-header {
    background: var(--egns-theme-border); /* Use border/light color for header in light mode */
    padding: 8px 15px;
    font-size: 12px; text-transform: uppercase; letter-spacing: 1px; 
    color: var(--egns-theme-text-muted);
    border-bottom: 1px solid var(--egns-theme-border);
}
body.dark .egns-copy-header { background: #252525; border-color: #333; color: #aaa; }

.egns-copy-body { 
    padding: 20px; font-family: 'Consolas', monospace; 
    color: var(--egns-theme-text);
    font-size: 15px; line-height: 1.6; 
    overflow-x: auto;
}
body.dark .egns-copy-body { color: #f0f0f0; }

.egns-copy-btn {
    position: absolute; top: 7px; right: 10px;
    background: var(--egns-accent); border: none; color: #fff;
    padding: 4px 10px; font-size: 12px; border-radius: 4px; cursor: pointer;
    transition: 0.3s;
}
.egns-copy-btn:hover { background: var(--egns-accent-hover); }


/* 3. Pros Cons (FIXED FOR LIGHT MODE) */
.egns-pc-box { 
    display: flex; gap: 20px; margin: 40px 0; 
    color: var(--egns-theme-text); 
}
.egns-pc-col {
    flex: 1; 
    background: var(--egns-theme-bg-card); /* Dynamic Background */
    padding: 30px; 
    border-radius: 12px; 
    border: 1px solid var(--egns-theme-border); /* Dynamic Border */
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05); /* Light shadow in light mode */
}
body.dark .egns-pc-col { 
    background: #1e1e1e; /* Darker Card Background in Dark Mode */
    border: 1px solid #333;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2); 
}

.egns-pc-col h4 { 
    margin: 0 0 20px; 
    display: flex; align-items: center; gap: 10px; 
    font-size: 20px; 
    color: var(--egns-theme-text); /* Dynamic Heading Color */
}

.egns-pc-col .icon { 
    width: 30px; height: 30px; border-radius: 50%; display: flex; 
    align-items: center; justify-content: center; font-size: 14px; font-weight: bold; color: #000; 
}
.pros .icon { background: var(--egns-success); }
.cons .icon { background: var(--egns-error); }

.egns-pc-col ul { list-style: none; padding: 0; margin: 0; }
.egns-pc-col li { 
    margin-bottom: 15px; padding-left: 35px; position: relative; 
    color: var(--egns-theme-text-muted); /* Dynamic List Item Color */
    font-size: 16px; 
}
.pros li::before { 
    content: '✓'; color: var(--egns-success); position: absolute; left: 0; 
    font-size: 20px; line-height: 1;
}
.cons li::before { 
    content: '✗'; color: var(--egns-error); position: absolute; left: 0; 
    font-size: 20px; line-height: 1;
}


/* 4. Verdict Box */
.egns-verdict-box {
    /* Base style (Light Mode friendly) */
    background: #f7f7f7;
    border: 1px solid #e0e0e0; 
    border-left: 5px solid var(--egns-accent); 
    border-radius: 10px; padding: 30px; display: flex; align-items: center; gap: 30px;
    margin: 50px 0; box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
body.dark .egns-verdict-box {
    /* Dark Mode Override */
    background: linear-gradient(145deg, #1e1e1e, #0f0f0f);
    border: 1px solid #333; 
    border-left: 5px solid var(--egns-accent); 
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}

.egns-verdict-score {
    width: 90px; height: 90px; 
    background: var(--egns-accent);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 900; color: #fff; 
    box-shadow: 0 0 25px rgba(163, 86, 255, 0.5); 
}
.egns-verdict-content { flex: 1; }
.egns-verdict-content h3 { color: var(--egns-theme-text); margin: 0 0 10px; font-size: 24px; }
.egns-verdict-content p { color: var(--egns-theme-text-muted); margin: 0; }

.egns-verdict-btn {
    background: var(--egns-accent); color: #fff; padding: 12px 30px; border-radius: 50px;
    text-decoration: none; font-weight: 700; display: inline-flex; align-items: center; gap: 8px;
    transition: 0.3s; box-shadow: 0 5px 20px rgba(163, 86, 255, 0.3);
}
.egns-verdict-btn:hover { background: var(--egns-accent-hover); }

/* --- Responsiveness --- */
@media (max-width: 768px) {
    .egns-pc-box, .egns-verdict-box { flex-direction: column; text-align: center; }
    .egns-verdict-action { width: 100%; }
    .egns-verdict-btn { width: 100%; justify-content: center; }
    .egns-verdict-score { margin: 0 auto 20px; }
    .egns-pc-col { padding: 20px; }
    .egns-pc-col li { padding-left: 30px; }
}