Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Main Page/styles.css: Difference between revisions

Template page
No edit summary
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* --- GLOBAL CONTAINER --- */
/**
.cs-wrapper {
* ComputerScience.wiki - Final Fix
     max-width: 1240px;
* 1. Responsive Grid
* 2. EXACT colors from your original file
* 3. FIX: Added 'clientpref-os' for automatic dark mode support
*/
 
/* --- 1. CONTAINER & TYPOGRAPHY --- */
.cs-container {
     max-width: 1200px;
     margin: 0 auto;
     margin: 0 auto;
     font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
     font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
     color: #1f2937;
     padding: 0 10px;
}
 
/* --- HERO: THE "IDE" LOOK --- */
.cs-ide-window {
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 50px;
    margin-top: 10px;
}
}


.cs-ide-header {
/* --- 2. HEADER --- */
    background-color: #f3f4f6;
.cs-header {
    padding: 10px 15px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}
 
/* Mac-style window dots */
.cs-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.cs-dot.red { background: #ef4444; }
.cs-dot.yellow { background: #f59e0b; }
.cs-dot.green { background: #10b981; }
 
.cs-ide-title {
    margin-left: 15px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #6b7280;
}
 
.cs-ide-content {
    padding: 40px;
     text-align: center;
     text-align: center;
    padding: 30px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
}
}


.cs-ide-content h1 {
.cs-title {
     font-size: 2.8em;
     font-size: 2em;
     font-weight: 800;
     font-weight: 700;
     margin: 0 0 10px 0;
     margin: 0;
    color: #000;
     border: none;
     border: none;
    letter-spacing: -1px;
    color: #2563eb; /* Fallback to solid blue for safety */
}
}


.cs-ide-content p {
.cs-subtitle {
     font-size: 1.2em;
     font-size: 1.1em;
     color: #4b5563;
     font-weight: normal;
     max-width: 600px;
     margin: 10px 0 0;
     margin: 0 auto 30px auto;
     color: #444;
}
}


/* --- SEARCH BAR --- */
/* --- 3. SEARCH BAR --- */
.cs-command-palette {
.cs-search {
     background: #f9fafb;
    max-width: 800px;
     border: 1px solid #d1d5db;
     margin: 0 auto 40px;
     padding: 25px;
     border-radius: 8px;
     border-radius: 8px;
     padding: 10px;
     background-color: #f5f5f5;
    max-width: 550px;
     border: 1px solid #ddd;
    margin: 0 auto;
    display: flex;
    align-items: center;
     box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);
}
}


.cs-command-palette input {
.cs-search input[type="search"],
     background: transparent !important;
.cs-search .mw-searchInput {
     border: none !important;
     background-color: #ffffff !important;
     font-family: 'Courier New', monospace !important;
     border: 1px solid #ddd !important;
     font-size: 1.1em !important;
    height: 40px !important;
    padding: 5px 12px !important;
     border-radius: 4px !important;
     font-size: 16px !important;
    color: #333 !important;
     width: 100% !important;
     width: 100% !important;
    outline: none !important;
    color: #374151 !important;
}
}


/* --- SECTION HEADERS --- */
.cs-search input[type="submit"],
.cs-section-head {
.cs-search .oo-ui-buttonElement-button {
     display: flex;
     min-width: 80px !important;
     align-items: center;
     background-color: #f0f0f0 !important;
     justify-content: space-between;
     border: 1px solid #ddd !important;
     margin-bottom: 20px;
     height: 40px !important;
     margin-top: 50px;
     font-weight: 600 !important;
     border-bottom: 2px solid #e5e7eb;
     cursor: pointer !important;
     padding-bottom: 10px;
     color: #333 !important;
}
}


.cs-section-head h2 {
.cs-search input[name="fulltext"] { display: none !important; }
    font-size: 1.5em;
    font-weight: 700;
    margin: 0;
    border: none;
    color: #111827;
}


.cs-tag {
/* --- 4. GRID LAYOUT --- */
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    color: #6b7280;
    background: #f3f4f6;
    padding: 4px 8px;
    border-radius: 4px;
}
 
/* --- GRID LAYOUT --- */
.cs-grid {
.cs-grid {
     display: grid;
     display: grid;
    /* Basic grid setup */
     grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
     grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
     gap: 25px;
     gap: 20px;
    margin-bottom: 30px;
}
}


/* --- FEATURE CARDS --- */
/* --- 5. CARDS & SECTIONS (Light Mode Defaults) --- */
.cs-section { margin-bottom: 30px; }
.cs-section-header { padding: 12px 15px; margin-bottom: 20px; border-radius: 6px; }
.cs-section-title { margin: 0; font-size: 1.3em; font-weight: 600; border: none; }
 
.cs-card {
.cs-card {
    background: #ffffff;
     border-radius: 6px;
    border: 1px solid #e5e7eb;
     overflow: hidden;
     border-radius: 10px;
    padding: 25px;
    transition: all 0.2s ease;
    position: relative;
     top: 0;
     height: 100%;
     height: 100%;
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
    border-width: 1px;
    border-style: solid;
    transition: transform 0.2s;
}
}


.cs-card:hover {
.cs-card:hover { transform: translateY(-3px); }
    top: -5px;
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}
 
.cs-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 12px;
}
 
.cs-icon-box {
    width: 40px;
    height: 40px;
    background: #eff6ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    color: #2563eb;
}
 
/* Specific colors for icons */
.cs-icon-green { background: #ecfdf5; color: #059669; }
.cs-icon-purple { background: #f5f3ff; color: #7c3aed; }
.cs-icon-orange { background: #fff7ed; color: #ea580c; }
.cs-icon-red { background: #fef2f2; color: #dc2626; }
 
.cs-card h3 {
    margin: 0;
    font-size: 1.25em;
    border: none;
    font-weight: 700;
}
 
.cs-card-desc {
    color: #6b7280;
    font-size: 0.95em;
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}


/* Styled Lists inside cards */
.cs-card-header { padding: 12px 15px; }
.cs-link-list {
.cs-card-title { margin: 0; font-size: 1.1em; font-weight: 600; border: none; }
    list-style: none;
.cs-card-body { padding: 15px; flex-grow: 1; }
    margin: 0;
.cs-card-list { margin: 0; padding: 0 0 0 10px; list-style: none; }
    padding: 0;
.cs-card-list li { margin-bottom: 8px; }
    border-top: 1px solid #f3f4f6;
.cs-card-footer { padding: 8px 15px; text-align: right; font-weight: bold; }
    padding-top: 15px;
.cs-card-footer a { text-decoration: none; }
}


.cs-link-list li {
/* ========================================================= */
    margin-bottom: 8px;
/* === COLOR THEMES (Light Mode) === */
    padding-left: 0;
/* ========================================================= */
}


.cs-link-list li a {
/* PROGRAMMING (Green) */
    text-decoration: none;
.cs-section.prog .cs-section-header { background-color: #cef2e0; border: 1px solid #cef2e0; }
    color: #374151;
.cs-section.prog .cs-card { background-color: #f5fffa; border-color: #cef2e0; }
    font-weight: 500;
.cs-section.prog .cs-card-header { background-color: #cef2e0; border-bottom: 1px solid #cef2e0; }
    font-size: 0.95em;
.cs-section.prog .cs-card-footer { background-color: #f5fffa; border-top: 1px solid #cef2e0; }
    display: block;
.cs-section.prog .cs-card-footer a { color: #2e8b57; }
    transition: color 0.2s;
}


.cs-link-list li a:hover {
/* DATA SCIENCE (Blue) */
    color: #2563eb;
.cs-section.data .cs-section-header { background-color: #cedff2; border: 1px solid #cedff2; }
}
.cs-section.data .cs-card { background-color: #f5faff; border-color: #cedff2; }
.cs-section.data .cs-card-header { background-color: #cedff2; border-bottom: 1px solid #cedff2; }
.cs-section.data .cs-card-footer { background-color: #f5faff; border-top: 1px solid #cedff2; }
.cs-section.data .cs-card-footer a { color: #4169e1; }


/* --- STATS BAR --- */
/* DATABASES (Pink) */
.cs-stats-bar {
.cs-section.db .cs-section-header { background-color: #f2cedd; border: 1px solid #f2cedd; }
    background: #111827;
.cs-section.db .cs-card { background-color: #fff5fa; border-color: #f2cedd; }
    color: white;
.cs-section.db .cs-card-header { background-color: #f2cedd; border-bottom: 1px solid #f2cedd; }
    padding: 30px;
.cs-section.db .cs-card-footer { background-color: #fff5fa; border-top: 1px solid #f2cedd; }
    border-radius: 12px;
.cs-section.db .cs-card-footer a { color: #db7093; }
    margin-top: 60px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: center;
}


.cs-stat-item strong {
/* INFRASTRUCTURE (Purple) */
    display: block;
.cs-section.inf .cs-section-header { background-color: #ddcef2; border: 1px solid #ddcef2; }
    font-size: 2.5em;
.cs-section.inf .cs-card { background-color: #faf5ff; border-color: #ddcef2; }
    color: #60a5fa;
.cs-section.inf .cs-card-header { background-color: #ddcef2; border-bottom: 1px solid #ddcef2; }
}
.cs-section.inf .cs-card-footer { background-color: #faf5ff; border-top: 1px solid #ddcef2; }
.cs-section.inf .cs-card-footer a { color: #8a2be2; }


.cs-stat-item span {
/* FUNDAMENTALS (Orange) */
    color: #9ca3af;
.cs-section.fund .cs-section-header { background-color: #f2e0ce; border: 1px solid #f2e0ce; }
    text-transform: uppercase;
.cs-section.fund .cs-card { background-color: #fffaf5; border-color: #f2e0ce; }
    font-size: 0.8em;
.cs-section.fund .cs-card-header { background-color: #f2e0ce; border-bottom: 1px solid #f2e0ce; }
    letter-spacing: 1px;
.cs-section.fund .cs-card-footer { background-color: #fffaf5; border-top: 1px solid #f2e0ce; }
}
.cs-section.fund .cs-card-footer a { color: #d2691e; }


/* --- RESPONSIVE TWEAKS --- */
/* COMMUNITY (Grey) */
@media (max-width: 768px) {
.cs-section.comm .cs-section-header { background-color: #eee; border: 1px solid #eee; }
    .cs-ide-content h1 { font-size: 2em; }
.cs-section.comm .cs-card { background-color: #f9f9f9; border-color: #eee; }
    .cs-grid { grid-template-columns: 1fr; }
.cs-section.comm .cs-card-header { background-color: #eee; border-bottom: 1px solid #eee; }
    .cs-stats-bar { flex-direction: column; gap: 20px; }
.cs-section.comm .cs-card-footer { background-color: #f9f9f9; border-top: 1px solid #eee; }
}
.cs-section.comm .cs-card-footer a { color: #444; }


/* ========================================= */
/* === DARK MODE OVERRIDES (Citizen Skin) === */
/* ========================================= */


html.skin-theme-clientpref-night .cs-wrapper {
/* ========================================================= */
    color: #e5e7eb;
/* === DARK MODE FIX (Citizen Skin) === */
}
/* ========================================================= */
 
/* Hero Dark Mode */
html.skin-theme-clientpref-night .cs-ide-window {
    background-color: #1f2937;
    border-color: #374151;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}


html.skin-theme-clientpref-night .cs-ide-header {
@media screen {
     background-color: #111827;
    /* 1. Global Components - Dark Mode */
     border-color: #374151;
    html.skin-theme-clientpref-night .cs-header,
}
    html.skin-theme-clientpref-os .cs-header {  
        background-color: #171a1d !important;
        border-color: #676767 !important;
    }
    html.skin-theme-clientpref-night .cs-title,
    html.skin-theme-clientpref-os .cs-title { color: #fff !important; }
    html.skin-theme-clientpref-night .cs-subtitle,
    html.skin-theme-clientpref-os .cs-subtitle { color: #ccc !important; }
   
    html.skin-theme-clientpref-night .cs-search,
    html.skin-theme-clientpref-os .cs-search {
        background-color: #252525 !important;
        border-color: #676767 !important;
     }
    html.skin-theme-clientpref-night .cs-search input,
    html.skin-theme-clientpref-os .cs-search input {
        background-color: #1f1f1f !important;
        color: #fff !important;
        border-color: #555 !important;  
     }
    html.skin-theme-clientpref-night .cs-search input[type="submit"],
    html.skin-theme-clientpref-os .cs-search input[type="submit"] {
        background-color: #444 !important;
        border-color: #555 !important;
        color: #fff !important;
    }
   
    html.skin-theme-clientpref-night .cs-section-title,
    html.skin-theme-clientpref-night .cs-card-title,
    html.skin-theme-clientpref-os .cs-section-title,
    html.skin-theme-clientpref-os .cs-card-title { color: #fff !important; }
   
    html.skin-theme-clientpref-night .cs-card-list li,
    html.skin-theme-clientpref-os .cs-card-list li { color: #ccc !important; }


html.skin-theme-clientpref-night .cs-ide-title {
    /* 2. Programming Dark */
     color: #9ca3af;
    html.skin-theme-clientpref-night .cs-section.prog .cs-section-header,
}
    html.skin-theme-clientpref-night .cs-section.prog .cs-card-header,
    html.skin-theme-clientpref-os .cs-section.prog .cs-section-header,
    html.skin-theme-clientpref-os .cs-section.prog .cs-card-header { background-color: #104437 !important; border-color: #104437 !important; }
      
    html.skin-theme-clientpref-night .cs-section.prog .cs-card,
    html.skin-theme-clientpref-night .cs-section.prog .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section.prog .cs-card,
    html.skin-theme-clientpref-os .cs-section.prog .cs-card-footer { background-color: #0b1e1c !important; border-color: #104437 !important; }
   
    html.skin-theme-clientpref-night .cs-section.prog .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section.prog .cs-card-footer a { color: #8fbc8f !important; }


html.skin-theme-clientpref-night .cs-ide-content h1 {
    /* 3. Data Science Dark */
     color: #60a5fa; /* Brighter blue for dark mode */
    html.skin-theme-clientpref-night .cs-section.data .cs-section-header,
}
    html.skin-theme-clientpref-night .cs-section.data .cs-card-header,
    html.skin-theme-clientpref-os .cs-section.data .cs-section-header,
    html.skin-theme-clientpref-os .cs-section.data .cs-card-header { background-color: #082849 !important; border-color: #082849 !important; }
      
    html.skin-theme-clientpref-night .cs-section.data .cs-card,
    html.skin-theme-clientpref-night .cs-section.data .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section.data .cs-card,
    html.skin-theme-clientpref-os .cs-section.data .cs-card-footer { background-color: #0d1a27 !important; border-color: #082849 !important; }
   
    html.skin-theme-clientpref-night .cs-section.data .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section.data .cs-card-footer a { color: #87cefa !important; }


html.skin-theme-clientpref-night .cs-ide-content p {
    /* 4. Databases Dark */
     color: #d1d5db;
    html.skin-theme-clientpref-night .cs-section.db .cs-section-header,
}
    html.skin-theme-clientpref-night .cs-section.db .cs-card-header,
    html.skin-theme-clientpref-os .cs-section.db .cs-section-header,
    html.skin-theme-clientpref-os .cs-section.db .cs-card-header { background-color: #882c43 !important; border-color: #882c43 !important; }
      
    html.skin-theme-clientpref-night .cs-section.db .cs-card,
    html.skin-theme-clientpref-night .cs-section.db .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section.db .cs-card,
    html.skin-theme-clientpref-os .cs-section.db .cs-card-footer { background-color: #270e1a !important; border-color: #882c43 !important; }
   
    html.skin-theme-clientpref-night .cs-section.db .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section.db .cs-card-footer a { color: #ffb6c1 !important; }


/* Search Dark Mode */
    /* 5. Infrastructure Dark */
html.skin-theme-clientpref-night .cs-command-palette {
    html.skin-theme-clientpref-night .cs-section.inf .cs-section-header,
     background: #111827;
    html.skin-theme-clientpref-night .cs-section.inf .cs-card-header,
     border-color: #4b5563;
    html.skin-theme-clientpref-os .cs-section.inf .cs-section-header,
}
     html.skin-theme-clientpref-os .cs-section.inf .cs-card-header { background-color: #7545ab !important; border-color: #7545ab !important; }
   
    html.skin-theme-clientpref-night .cs-section.inf .cs-card,
    html.skin-theme-clientpref-night .cs-section.inf .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section.inf .cs-card,
     html.skin-theme-clientpref-os .cs-section.inf .cs-card-footer { background-color: #130e20 !important; border-color: #7545ab !important; }
   
    html.skin-theme-clientpref-night .cs-section.inf .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section.inf .cs-card-footer a { color: #da70d6 !important; }


html.skin-theme-clientpref-night .cs-command-palette input {
     /* 6. Fundamentals Dark */
     color: #f3f4f6 !important;
    html.skin-theme-clientpref-night .cs-section.fund .cs-section-header,
}
     html.skin-theme-clientpref-night .cs-section.fund .cs-card-header,
 
     html.skin-theme-clientpref-os .cs-section.fund .cs-section-header,
/* Section Headers Dark Mode */
     html.skin-theme-clientpref-os .cs-section.fund .cs-card-header { background-color: #663428 !important; border-color: #663428 !important; }
html.skin-theme-clientpref-night .cs-section-head {
   
     border-color: #374151;
    html.skin-theme-clientpref-night .cs-section.fund .cs-card,
}
     html.skin-theme-clientpref-night .cs-section.fund .cs-card-footer,
 
     html.skin-theme-clientpref-os .cs-section.fund .cs-card,
html.skin-theme-clientpref-night .cs-section-head h2 {
    html.skin-theme-clientpref-os .cs-section.fund .cs-card-footer { background-color: #331a00 !important; border-color: #663428 !important; }
     color: #f9fafb;
   
}
    html.skin-theme-clientpref-night .cs-section.fund .cs-card-footer a,
 
    html.skin-theme-clientpref-os .cs-section.fund .cs-card-footer a { color: #ffa500 !important; }
html.skin-theme-clientpref-night .cs-tag {
    background: #374151;
    color: #d1d5db;
}
 
/* Card Dark Mode */
html.skin-theme-clientpref-night .cs-card {
    background-color: #1f2937;
     border-color: #374151;
}
 
html.skin-theme-clientpref-night .cs-card:hover {
    background-color: #273548;
    border-color: #60a5fa;
}
 
html.skin-theme-clientpref-night .cs-card h3 {
     color: #f3f4f6;
}
 
html.skin-theme-clientpref-night .cs-card-desc {
     color: #9ca3af;
}
 
/* Card Icons Dark Mode */
html.skin-theme-clientpref-night .cs-icon-box { background: #1e3a8a; color: #93c5fd; }
html.skin-theme-clientpref-night .cs-icon-green { background: #064e3b; color: #6ee7b7; }
html.skin-theme-clientpref-night .cs-icon-purple { background: #4c1d95; color: #c4b5fd; }
html.skin-theme-clientpref-night .cs-icon-orange { background: #7c2d12; color: #fdba74; }
html.skin-theme-clientpref-night .cs-icon-red { background: #7f1d1d; color: #fca5a5; }
 
/* Links Dark Mode */
html.skin-theme-clientpref-night .cs-link-list {
    border-top-color: #374151;
}
 
html.skin-theme-clientpref-night .cs-link-list li a {
    color: #d1d5db;
}


html.skin-theme-clientpref-night .cs-link-list li a:hover {
    /* 7. Community Dark */
     color: #60a5fa;
    html.skin-theme-clientpref-night .cs-section.comm .cs-section-header,
    html.skin-theme-clientpref-night .cs-section.comm .cs-card-header,
    html.skin-theme-clientpref-os .cs-section.comm .cs-section-header,
    html.skin-theme-clientpref-os .cs-section.comm .cs-card-header { background-color: #3d3d3d !important; border-color: #3d3d3d !important; }
   
    html.skin-theme-clientpref-night .cs-section.comm .cs-card,
    html.skin-theme-clientpref-night .cs-section.comm .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section.comm .cs-card,
    html.skin-theme-clientpref-os .cs-section.comm .cs-card-footer { background-color: #171a1d !important; border-color: #3d3d3d !important; }
   
     html.skin-theme-clientpref-night .cs-section.comm .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section.comm .cs-card-footer a { color: #ccc !important; }
}
}

Latest revision as of 23:40, 22 November 2025

/**
 * ComputerScience.wiki - Final Fix
 * 1. Responsive Grid
 * 2. EXACT colors from your original file
 * 3. FIX: Added 'clientpref-os' for automatic dark mode support
 */

/* --- 1. CONTAINER & TYPOGRAPHY --- */
.cs-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    padding: 0 10px;
}

/* --- 2. HEADER --- */
.cs-header {
    text-align: center;
    padding: 30px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
}

.cs-title {
    font-size: 2em;
    font-weight: 700;
    margin: 0;
    color: #000;
    border: none;
}

.cs-subtitle {
    font-size: 1.1em;
    font-weight: normal;
    margin: 10px 0 0;
    color: #444;
}

/* --- 3. SEARCH BAR --- */
.cs-search {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 25px;
    border-radius: 8px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
}

.cs-search input[type="search"],
.cs-search .mw-searchInput {
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
    height: 40px !important;
    padding: 5px 12px !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    color: #333 !important;
    width: 100% !important;
}

.cs-search input[type="submit"],
.cs-search .oo-ui-buttonElement-button {
    min-width: 80px !important;
    background-color: #f0f0f0 !important;
    border: 1px solid #ddd !important;
    height: 40px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    color: #333 !important;
}

.cs-search input[name="fulltext"] { display: none !important; }

/* --- 4. GRID LAYOUT --- */
.cs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* --- 5. CARDS & SECTIONS (Light Mode Defaults) --- */
.cs-section { margin-bottom: 30px; }
.cs-section-header { padding: 12px 15px; margin-bottom: 20px; border-radius: 6px; }
.cs-section-title { margin: 0; font-size: 1.3em; font-weight: 600; border: none; }

.cs-card {
    border-radius: 6px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-width: 1px;
    border-style: solid;
    transition: transform 0.2s;
}

.cs-card:hover { transform: translateY(-3px); }

.cs-card-header { padding: 12px 15px; }
.cs-card-title { margin: 0; font-size: 1.1em; font-weight: 600; border: none; }
.cs-card-body { padding: 15px; flex-grow: 1; }
.cs-card-list { margin: 0; padding: 0 0 0 10px; list-style: none; }
.cs-card-list li { margin-bottom: 8px; }
.cs-card-footer { padding: 8px 15px; text-align: right; font-weight: bold; }
.cs-card-footer a { text-decoration: none; }

/* ========================================================= */
/* === COLOR THEMES (Light Mode) === */
/* ========================================================= */

/* PROGRAMMING (Green) */
.cs-section.prog .cs-section-header { background-color: #cef2e0; border: 1px solid #cef2e0; }
.cs-section.prog .cs-card { background-color: #f5fffa; border-color: #cef2e0; }
.cs-section.prog .cs-card-header { background-color: #cef2e0; border-bottom: 1px solid #cef2e0; }
.cs-section.prog .cs-card-footer { background-color: #f5fffa; border-top: 1px solid #cef2e0; }
.cs-section.prog .cs-card-footer a { color: #2e8b57; }

/* DATA SCIENCE (Blue) */
.cs-section.data .cs-section-header { background-color: #cedff2; border: 1px solid #cedff2; }
.cs-section.data .cs-card { background-color: #f5faff; border-color: #cedff2; }
.cs-section.data .cs-card-header { background-color: #cedff2; border-bottom: 1px solid #cedff2; }
.cs-section.data .cs-card-footer { background-color: #f5faff; border-top: 1px solid #cedff2; }
.cs-section.data .cs-card-footer a { color: #4169e1; }

/* DATABASES (Pink) */
.cs-section.db .cs-section-header { background-color: #f2cedd; border: 1px solid #f2cedd; }
.cs-section.db .cs-card { background-color: #fff5fa; border-color: #f2cedd; }
.cs-section.db .cs-card-header { background-color: #f2cedd; border-bottom: 1px solid #f2cedd; }
.cs-section.db .cs-card-footer { background-color: #fff5fa; border-top: 1px solid #f2cedd; }
.cs-section.db .cs-card-footer a { color: #db7093; }

/* INFRASTRUCTURE (Purple) */
.cs-section.inf .cs-section-header { background-color: #ddcef2; border: 1px solid #ddcef2; }
.cs-section.inf .cs-card { background-color: #faf5ff; border-color: #ddcef2; }
.cs-section.inf .cs-card-header { background-color: #ddcef2; border-bottom: 1px solid #ddcef2; }
.cs-section.inf .cs-card-footer { background-color: #faf5ff; border-top: 1px solid #ddcef2; }
.cs-section.inf .cs-card-footer a { color: #8a2be2; }

/* FUNDAMENTALS (Orange) */
.cs-section.fund .cs-section-header { background-color: #f2e0ce; border: 1px solid #f2e0ce; }
.cs-section.fund .cs-card { background-color: #fffaf5; border-color: #f2e0ce; }
.cs-section.fund .cs-card-header { background-color: #f2e0ce; border-bottom: 1px solid #f2e0ce; }
.cs-section.fund .cs-card-footer { background-color: #fffaf5; border-top: 1px solid #f2e0ce; }
.cs-section.fund .cs-card-footer a { color: #d2691e; }

/* COMMUNITY (Grey) */
.cs-section.comm .cs-section-header { background-color: #eee; border: 1px solid #eee; }
.cs-section.comm .cs-card { background-color: #f9f9f9; border-color: #eee; }
.cs-section.comm .cs-card-header { background-color: #eee; border-bottom: 1px solid #eee; }
.cs-section.comm .cs-card-footer { background-color: #f9f9f9; border-top: 1px solid #eee; }
.cs-section.comm .cs-card-footer a { color: #444; }


/* ========================================================= */
/* === DARK MODE FIX (Citizen Skin) === */
/* ========================================================= */

@media screen {
    /* 1. Global Components - Dark Mode */
    html.skin-theme-clientpref-night .cs-header,
    html.skin-theme-clientpref-os .cs-header { 
        background-color: #171a1d !important; 
        border-color: #676767 !important; 
    }
    html.skin-theme-clientpref-night .cs-title,
    html.skin-theme-clientpref-os .cs-title { color: #fff !important; }
    html.skin-theme-clientpref-night .cs-subtitle,
    html.skin-theme-clientpref-os .cs-subtitle { color: #ccc !important; }
    
    html.skin-theme-clientpref-night .cs-search,
    html.skin-theme-clientpref-os .cs-search { 
        background-color: #252525 !important; 
        border-color: #676767 !important; 
    }
    html.skin-theme-clientpref-night .cs-search input,
    html.skin-theme-clientpref-os .cs-search input { 
        background-color: #1f1f1f !important; 
        color: #fff !important; 
        border-color: #555 !important; 
    }
    html.skin-theme-clientpref-night .cs-search input[type="submit"],
    html.skin-theme-clientpref-os .cs-search input[type="submit"] { 
        background-color: #444 !important; 
        border-color: #555 !important; 
        color: #fff !important; 
    }
    
    html.skin-theme-clientpref-night .cs-section-title,
    html.skin-theme-clientpref-night .cs-card-title,
    html.skin-theme-clientpref-os .cs-section-title,
    html.skin-theme-clientpref-os .cs-card-title { color: #fff !important; }
    
    html.skin-theme-clientpref-night .cs-card-list li,
    html.skin-theme-clientpref-os .cs-card-list li { color: #ccc !important; }

    /* 2. Programming Dark */
    html.skin-theme-clientpref-night .cs-section.prog .cs-section-header,
    html.skin-theme-clientpref-night .cs-section.prog .cs-card-header,
    html.skin-theme-clientpref-os .cs-section.prog .cs-section-header,
    html.skin-theme-clientpref-os .cs-section.prog .cs-card-header { background-color: #104437 !important; border-color: #104437 !important; }
    
    html.skin-theme-clientpref-night .cs-section.prog .cs-card,
    html.skin-theme-clientpref-night .cs-section.prog .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section.prog .cs-card,
    html.skin-theme-clientpref-os .cs-section.prog .cs-card-footer { background-color: #0b1e1c !important; border-color: #104437 !important; }
    
    html.skin-theme-clientpref-night .cs-section.prog .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section.prog .cs-card-footer a { color: #8fbc8f !important; }

    /* 3. Data Science Dark */
    html.skin-theme-clientpref-night .cs-section.data .cs-section-header,
    html.skin-theme-clientpref-night .cs-section.data .cs-card-header,
    html.skin-theme-clientpref-os .cs-section.data .cs-section-header,
    html.skin-theme-clientpref-os .cs-section.data .cs-card-header { background-color: #082849 !important; border-color: #082849 !important; }
    
    html.skin-theme-clientpref-night .cs-section.data .cs-card,
    html.skin-theme-clientpref-night .cs-section.data .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section.data .cs-card,
    html.skin-theme-clientpref-os .cs-section.data .cs-card-footer { background-color: #0d1a27 !important; border-color: #082849 !important; }
    
    html.skin-theme-clientpref-night .cs-section.data .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section.data .cs-card-footer a { color: #87cefa !important; }

    /* 4. Databases Dark */
    html.skin-theme-clientpref-night .cs-section.db .cs-section-header,
    html.skin-theme-clientpref-night .cs-section.db .cs-card-header,
    html.skin-theme-clientpref-os .cs-section.db .cs-section-header,
    html.skin-theme-clientpref-os .cs-section.db .cs-card-header { background-color: #882c43 !important; border-color: #882c43 !important; }
    
    html.skin-theme-clientpref-night .cs-section.db .cs-card,
    html.skin-theme-clientpref-night .cs-section.db .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section.db .cs-card,
    html.skin-theme-clientpref-os .cs-section.db .cs-card-footer { background-color: #270e1a !important; border-color: #882c43 !important; }
    
    html.skin-theme-clientpref-night .cs-section.db .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section.db .cs-card-footer a { color: #ffb6c1 !important; }

    /* 5. Infrastructure Dark */
    html.skin-theme-clientpref-night .cs-section.inf .cs-section-header,
    html.skin-theme-clientpref-night .cs-section.inf .cs-card-header,
    html.skin-theme-clientpref-os .cs-section.inf .cs-section-header,
    html.skin-theme-clientpref-os .cs-section.inf .cs-card-header { background-color: #7545ab !important; border-color: #7545ab !important; }
    
    html.skin-theme-clientpref-night .cs-section.inf .cs-card,
    html.skin-theme-clientpref-night .cs-section.inf .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section.inf .cs-card,
    html.skin-theme-clientpref-os .cs-section.inf .cs-card-footer { background-color: #130e20 !important; border-color: #7545ab !important; }
    
    html.skin-theme-clientpref-night .cs-section.inf .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section.inf .cs-card-footer a { color: #da70d6 !important; }

    /* 6. Fundamentals Dark */
    html.skin-theme-clientpref-night .cs-section.fund .cs-section-header,
    html.skin-theme-clientpref-night .cs-section.fund .cs-card-header,
    html.skin-theme-clientpref-os .cs-section.fund .cs-section-header,
    html.skin-theme-clientpref-os .cs-section.fund .cs-card-header { background-color: #663428 !important; border-color: #663428 !important; }
    
    html.skin-theme-clientpref-night .cs-section.fund .cs-card,
    html.skin-theme-clientpref-night .cs-section.fund .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section.fund .cs-card,
    html.skin-theme-clientpref-os .cs-section.fund .cs-card-footer { background-color: #331a00 !important; border-color: #663428 !important; }
    
    html.skin-theme-clientpref-night .cs-section.fund .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section.fund .cs-card-footer a { color: #ffa500 !important; }

    /* 7. Community Dark */
    html.skin-theme-clientpref-night .cs-section.comm .cs-section-header,
    html.skin-theme-clientpref-night .cs-section.comm .cs-card-header,
    html.skin-theme-clientpref-os .cs-section.comm .cs-section-header,
    html.skin-theme-clientpref-os .cs-section.comm .cs-card-header { background-color: #3d3d3d !important; border-color: #3d3d3d !important; }
    
    html.skin-theme-clientpref-night .cs-section.comm .cs-card,
    html.skin-theme-clientpref-night .cs-section.comm .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section.comm .cs-card,
    html.skin-theme-clientpref-os .cs-section.comm .cs-card-footer { background-color: #171a1d !important; border-color: #3d3d3d !important; }
    
    html.skin-theme-clientpref-night .cs-section.comm .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section.comm .cs-card-footer a { color: #ccc !important; }
}