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
 
(35 intermediate revisions by the same user not shown)
Line 1: Line 1:
/**
/**
  * ComputerScience.wiki - Main Page Styles
  * ComputerScience.wiki - Final Fix
  * Following Squadz/mediawiki/MediaWiki-Common.css color scheme
  * 1. Responsive Grid
* 2. EXACT colors from your original file
* 3. FIX: Added 'clientpref-os' for automatic dark mode support
  */
  */


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


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


Line 25: Line 29:
     margin: 0;
     margin: 0;
     color: #000;
     color: #000;
    border: none;
}
}


Line 34: Line 39:
}
}


.cs-stats {
/* --- 3. SEARCH BAR --- */
    margin-top: 15px;
    font-size: 0.9em;
    color: #555;
}
 
/* Search */
.cs-search {
.cs-search {
     max-width: 600px;
     max-width: 800px;
     margin: 0 auto 40px;
     margin: 0 auto 40px;
     padding: 15px;
     padding: 25px;
     border-radius: 8px;
     border-radius: 8px;
    background-color: #f5f5f5;
     border: 1px solid #ddd;
     border: 1px solid #ddd;
}
}


/* Section Headers - All in one container with aligned icon and title */
.cs-search input[type="search"],
.cs-section {
.cs-search .mw-searchInput {
     margin-bottom: 30px;
     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-section-header {
.cs-search input[type="submit"],
     display: flex;
.cs-search .oo-ui-buttonElement-button {
     align-items: center;
     min-width: 80px !important;
     padding: 12px 15px;
     background-color: #f0f0f0 !important;
     margin-bottom: 20px;
     border: 1px solid #ddd !important;
     border-radius: 6px;
     height: 40px !important;
     border: 1px solid #ddd;
    font-weight: 600 !important;
     cursor: pointer !important;
     color: #333 !important;
}
}


.cs-section-title {
.cs-search input[name="fulltext"] { display: none !important; }
    margin: 0;
    font-size: 1.3em;
    font-weight: 600;
}


/* Grid Layout */
/* --- 4. GRID LAYOUT --- */
.cs-grid {
.cs-grid {
     display: table;
     display: grid;
     width: 100%;
     grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    border-spacing: 10px;
     gap: 20px;
     border-collapse: separate;
     margin-bottom: 30px;
     margin: 0 -10px;
}
 
.cs-row {
    display: table-row;
}
}


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


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


.cs-card-header {
.cs-card:hover { transform: translateY(-3px); }
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
}


.cs-card-title {
.cs-card-header { padding: 12px 15px; }
    margin: 0;
.cs-card-title { margin: 0; font-size: 1.1em; font-weight: 600; border: none; }
    font-size: 1.1em;
.cs-card-body { padding: 15px; flex-grow: 1; }
    font-weight: 600;
.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; }


.cs-card-body {
/* ========================================================= */
    padding: 15px;
/* === COLOR THEMES (Light Mode) === */
}
/* ========================================================= */


.cs-card-list {
/* PROGRAMMING (Green) */
    margin: 0;
.cs-section.prog .cs-section-header { background-color: #cef2e0; border: 1px solid #cef2e0; }
    padding: 0 0 0 20px;
.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-card-list li {
.cs-section.prog .cs-card-footer a { color: #2e8b57; }
    margin-bottom: 10px;
}
 
.cs-card-footer {
    padding: 12px 15px;
    text-align: right;
    border-top: 1px solid #ddd;
}


/* Light theme colors - Using the same pastel colors from the reference */
/* DATA SCIENCE (Blue) */
@media screen {
.cs-section.data .cs-section-header { background-color: #cedff2; border: 1px solid #cedff2; }
    .cs-header {
.cs-section.data .cs-card { background-color: #f5faff; border-color: #cedff2; }
        background-color: #f9f9f9;
.cs-section.data .cs-card-header { background-color: #cedff2; border-bottom: 1px solid #cedff2; }
        border-color: #ddd;
.cs-section.data .cs-card-footer { background-color: #f5faff; border-top: 1px solid #cedff2; }
    }
.cs-section.data .cs-card-footer a { color: #4169e1; }
   
    /* Programming section */
    .cs-section:nth-child(3) .cs-section-header {
        background-color: #cef2e0;
        border-color: #a3bfb1;
    }
   
    .cs-section:nth-child(3) .cs-card {
        background-color: #f5fffa;
        border-color: #cef2e0;
    }
   
    .cs-section:nth-child(3) .cs-card-header {
        background-color: #cef2e0;
        border-color: #a3bfb1;
    }
   
    .cs-section:nth-child(3) .cs-card-footer {
        background-color: #f5fffa;
        border-color: #cef2e0;
    }
   
    /* Data Science section */
    .cs-section:nth-child(4) .cs-section-header {
        background-color: #cedff2;
        border-color: #a3b0bf;
    }
   
    .cs-section:nth-child(4) .cs-card {
        background-color: #f5faff;
        border-color: #cedff2;
    }
   
    .cs-section:nth-child(4) .cs-card-header {
        background-color: #cedff2;
        border-color: #a3b0bf;
    }
   
    .cs-section:nth-child(4) .cs-card-footer {
        background-color: #f5faff;
        border-color: #cedff2;
    }
   
    /* Databases section */
    .cs-section:nth-child(5) .cs-section-header {
        background-color: #f2cedd;
        border-color: #bfa3af;
    }
   
    .cs-section:nth-child(5) .cs-card {
        background-color: #fff5fa;
        border-color: #f2cedd;
    }
   
    .cs-section:nth-child(5) .cs-card-header {
        background-color: #f2cedd;
        border-color: #bfa3af;
    }
   
    .cs-section:nth-child(5) .cs-card-footer {
        background-color: #fff5fa;
        border-color: #f2cedd;
    }
   
    /* Infrastructure section */
    .cs-section:nth-child(6) .cs-section-header {
        background-color: #ddcef2;
        border-color: #afa3bf;
    }
   
    .cs-section:nth-child(6) .cs-card {
        background-color: #faf5ff;
        border-color: #ddcef2;
    }
   
    .cs-section:nth-child(6) .cs-card-header {
        background-color: #ddcef2;
        border-color: #afa3bf;
    }
   
    .cs-section:nth-child(6) .cs-card-footer {
        background-color: #faf5ff;
        border-color: #ddcef2;
    }
   
    /* CS Fundamentals section */
    .cs-section:nth-child(7) .cs-section-header {
        background-color: #f2e0ce;
        border-color: #bfa38d;
    }
   
    .cs-section:nth-child(7) .cs-card {
        background-color: #fffaf5;
        border-color: #f2e0ce;
    }
   
    .cs-section:nth-child(7) .cs-card-header {
        background-color: #f2e0ce;
        border-color: #bfa38d;
    }
   
    .cs-section:nth-child(7) .cs-card-footer {
        background-color: #fffaf5;
        border-color: #f2e0ce;
    }
   
    /* Community section */
    .cs-section:nth-child(8) .cs-section-header {
        background-color: #eee;
        border-color: #ddd;
    }
   
    .cs-section:nth-child(8) .cs-card {
        background-color: #f9f9f9;
        border-color: #eee;
    }
   
    .cs-section:nth-child(8) .cs-card-header {
        background-color: #eee;
        border-color: #ddd;
    }
   
    .cs-section:nth-child(8) .cs-card-footer {
        background-color: #f9f9f9;
        border-color: #eee;
    }
}


/* Night mode - using the exact colors from your example */
/* DATABASES (Pink) */
html.skin-theme-clientpref-night .cs-header {
.cs-section.db .cs-section-header { background-color: #f2cedd; border: 1px solid #f2cedd; }
    background-color: #171a1d;
.cs-section.db .cs-card { background-color: #fff5fa; border-color: #f2cedd; }
    border-color: #676767;
.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; }


/* Programming section - dark */
/* INFRASTRUCTURE (Purple) */
html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-section-header {
.cs-section.inf .cs-section-header { background-color: #ddcef2; border: 1px solid #ddcef2; }
    background-color: #104437;
.cs-section.inf .cs-card { background-color: #faf5ff; border-color: #ddcef2; }
    border-color: #2f4d41;
.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; }


html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-card {
/* FUNDAMENTALS (Orange) */
    background-color: #0b1e1c;
.cs-section.fund .cs-section-header { background-color: #f2e0ce; border: 1px solid #f2e0ce; }
    border-color: #104437;
.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; }


html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-card-header {
/* COMMUNITY (Grey) */
    background-color: #104437;
.cs-section.comm .cs-section-header { background-color: #eee; border: 1px solid #eee; }
    border-color: #2f4d41;
.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; }


html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-card-footer {
    background-color: #0b1e1c;
    border-color: #104437;
}


/* Data Science section - dark */
/* ========================================================= */
html.skin-theme-clientpref-night .cs-section:nth-child(4) .cs-section-header {
/* === DARK MODE FIX (Citizen Skin) === */
    background-color: #082849;
/* ========================================================= */
    border-color: #a3b0bf;
}


html.skin-theme-clientpref-night .cs-section:nth-child(4) .cs-card {
@media screen {
    background-color: #0d1a27;
     /* 1. Global Components - Dark Mode */
    border-color: #082849;
     html.skin-theme-clientpref-night .cs-header,
}
     html.skin-theme-clientpref-os .cs-header {  
 
         background-color: #171a1d !important;  
html.skin-theme-clientpref-night .cs-section:nth-child(4) .cs-card-header {
         border-color: #676767 !important;  
    background-color: #082849;
    border-color: #a3b0bf;
}
 
html.skin-theme-clientpref-night .cs-section:nth-child(4) .cs-card-footer {
     background-color: #0d1a27;
    border-color: #082849;
}
 
/* Databases section - dark */
html.skin-theme-clientpref-night .cs-section:nth-child(5) .cs-section-header {
    background-color: #882c43;
    border-color: #926c80;
}
 
html.skin-theme-clientpref-night .cs-section:nth-child(5) .cs-card {
    background-color: #270e1a;
    border-color: #882c43;
}
 
html.skin-theme-clientpref-night .cs-section:nth-child(5) .cs-card-header {
    background-color: #882c43;
    border-color: #926c80;
}
 
html.skin-theme-clientpref-night .cs-section:nth-child(5) .cs-card-footer {
    background-color: #270e1a;
    border-color: #882c43;
}
 
/* Infrastructure section - dark */
html.skin-theme-clientpref-night .cs-section:nth-child(6) .cs-section-header {
     background-color: #7545ab;
    border-color: #afa3bf;
}
 
html.skin-theme-clientpref-night .cs-section:nth-child(6) .cs-card {
    background-color: #130e20;
    border-color: #7545ab;
}
 
html.skin-theme-clientpref-night .cs-section:nth-child(6) .cs-card-header {
    background-color: #7545ab;
    border-color: #afa3bf;
}
 
html.skin-theme-clientpref-night .cs-section:nth-child(6) .cs-card-footer {
    background-color: #130e20;
    border-color: #7545ab;
}
 
/* CS Fundamentals section - dark */
html.skin-theme-clientpref-night .cs-section:nth-child(7) .cs-section-header {
    background-color: #663428;
    border-color: #8a6b5c;
}
 
html.skin-theme-clientpref-night .cs-section:nth-child(7) .cs-card {
    background-color: #331a00;
    border-color: #663428;
}
 
html.skin-theme-clientpref-night .cs-section:nth-child(7) .cs-card-header {
    background-color: #663428;
    border-color: #8a6b5c;
}
 
html.skin-theme-clientpref-night .cs-section:nth-child(7) .cs-card-footer {
    background-color: #331a00;
    border-color: #663428;
}
 
/* Community section - dark */
html.skin-theme-clientpref-night .cs-section:nth-child(8) .cs-section-header {
    background-color: #3d3d3d;
    border-color: #676767;
}
 
html.skin-theme-clientpref-night .cs-section:nth-child(8) .cs-card {
    background-color: #171a1d;
    border-color: #3d3d3d;
}
 
html.skin-theme-clientpref-night .cs-section:nth-child(8) .cs-card-header {
    background-color: #3d3d3d;
    border-color: #676767;
}
 
html.skin-theme-clientpref-night .cs-section:nth-child(8) .cs-card-footer {
    background-color: #171a1d;
    border-color: #3d3d3d;
}
 
/* OS night mode - exact same selectors and colors from your reference */
@media screen and (prefers-color-scheme: dark) {
     html.skin-theme-clientpref-os .cs-header {
         background-color: #171a1d;
         border-color: #676767;
    }
   
    /* Programming section - OS dark */
    html.skin-theme-clientpref-os .cs-section:nth-child(3) .cs-section-header {
        background-color: #104437;
        border-color: #2f4d41;
     }
     }
    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-os .cs-section:nth-child(3) .cs-card {
     html.skin-theme-clientpref-night .cs-search,
         background-color: #0b1e1c;
    html.skin-theme-clientpref-os .cs-search {  
         border-color: #104437;
         background-color: #252525 !important;  
         border-color: #676767 !important;  
     }
     }
   
     html.skin-theme-clientpref-night .cs-search input,
     html.skin-theme-clientpref-os .cs-section:nth-child(3) .cs-card-header {
    html.skin-theme-clientpref-os .cs-search input {  
         background-color: #104437;
         background-color: #1f1f1f !important;
         border-color: #2f4d41;
        color: #fff !important;  
         border-color: #555 !important;  
     }
     }
   
     html.skin-theme-clientpref-night .cs-search input[type="submit"],
     html.skin-theme-clientpref-os .cs-section:nth-child(3) .cs-card-footer {
    html.skin-theme-clientpref-os .cs-search input[type="submit"] {  
         background-color: #0b1e1c;
         background-color: #444 !important;  
         border-color: #104437;
         border-color: #555 !important;
        color: #fff !important;  
     }
     }
      
      
     /* Data Science section - OS dark */
     html.skin-theme-clientpref-night .cs-section-title,
     html.skin-theme-clientpref-os .cs-section:nth-child(4) .cs-section-header {
     html.skin-theme-clientpref-night .cs-card-title,
        background-color: #082849;
    html.skin-theme-clientpref-os .cs-section-title,
        border-color: #a3b0bf;
    html.skin-theme-clientpref-os .cs-card-title { color: #fff !important; }
    }
      
      
     html.skin-theme-clientpref-os .cs-section:nth-child(4) .cs-card {
    html.skin-theme-clientpref-night .cs-card-list li,
        background-color: #0d1a27;
     html.skin-theme-clientpref-os .cs-card-list li { color: #ccc !important; }
        border-color: #082849;
 
    }
    /* 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-os .cs-section:nth-child(4) .cs-card-header {
    html.skin-theme-clientpref-night .cs-section.prog .cs-card,
        background-color: #082849;
    html.skin-theme-clientpref-night .cs-section.prog .cs-card-footer,
        border-color: #a3b0bf;
     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-os .cs-section:nth-child(4) .cs-card-footer {
    html.skin-theme-clientpref-night .cs-section.prog .cs-card-footer a,
        background-color: #0d1a27;
     html.skin-theme-clientpref-os .cs-section.prog .cs-card-footer a { color: #8fbc8f !important; }
        border-color: #082849;
 
    }
    /* 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; }
      
      
     /* Databases section - OS dark */
     html.skin-theme-clientpref-night .cs-section.data .cs-card,
     html.skin-theme-clientpref-os .cs-section:nth-child(5) .cs-section-header {
    html.skin-theme-clientpref-night .cs-section.data .cs-card-footer,
        background-color: #882c43;
     html.skin-theme-clientpref-os .cs-section.data .cs-card,
        border-color: #926c80;
    html.skin-theme-clientpref-os .cs-section.data .cs-card-footer { background-color: #0d1a27 !important; border-color: #082849 !important; }
    }
      
      
     html.skin-theme-clientpref-os .cs-section:nth-child(5) .cs-card {
    html.skin-theme-clientpref-night .cs-section.data .cs-card-footer a,
        background-color: #270e1a;
     html.skin-theme-clientpref-os .cs-section.data .cs-card-footer a { color: #87cefa !important; }
        border-color: #882c43;
 
    }
    /* 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-os .cs-section:nth-child(5) .cs-card-header {
    html.skin-theme-clientpref-night .cs-section.db .cs-card,
        background-color: #882c43;
    html.skin-theme-clientpref-night .cs-section.db .cs-card-footer,
        border-color: #926c80;
     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-os .cs-section:nth-child(5) .cs-card-footer {
     html.skin-theme-clientpref-night .cs-section.db .cs-card-footer a,
        background-color: #270e1a;
    html.skin-theme-clientpref-os .cs-section.db .cs-card-footer a { color: #ffb6c1 !important; }
        border-color: #882c43;
 
    }
     /* 5. Infrastructure Dark */
   
    html.skin-theme-clientpref-night .cs-section.inf .cs-section-header,
     /* Infrastructure section - OS dark */
    html.skin-theme-clientpref-night .cs-section.inf .cs-card-header,
     html.skin-theme-clientpref-os .cs-section:nth-child(6) .cs-section-header {
     html.skin-theme-clientpref-os .cs-section.inf .cs-section-header,
        background-color: #7545ab;
    html.skin-theme-clientpref-os .cs-section.inf .cs-card-header { background-color: #7545ab !important; border-color: #7545ab !important; }
        border-color: #afa3bf;
    }
      
      
     html.skin-theme-clientpref-os .cs-section:nth-child(6) .cs-card {
    html.skin-theme-clientpref-night .cs-section.inf .cs-card,
        background-color: #130e20;
    html.skin-theme-clientpref-night .cs-section.inf .cs-card-footer,
        border-color: #7545ab;
     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-os .cs-section:nth-child(6) .cs-card-header {
    html.skin-theme-clientpref-night .cs-section.inf .cs-card-footer a,
        background-color: #7545ab;
     html.skin-theme-clientpref-os .cs-section.inf .cs-card-footer a { color: #da70d6 !important; }
        border-color: #afa3bf;
 
    }
    /* 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-os .cs-section:nth-child(6) .cs-card-footer {
    html.skin-theme-clientpref-night .cs-section.fund .cs-card,
        background-color: #130e20;
    html.skin-theme-clientpref-night .cs-section.fund .cs-card-footer,
        border-color: #7545ab;
     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; }
      
      
    /* CS Fundamentals section - OS dark */
     html.skin-theme-clientpref-night .cs-section.fund .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section:nth-child(7) .cs-section-header {
     html.skin-theme-clientpref-os .cs-section.fund .cs-card-footer a { color: #ffa500 !important; }
        background-color: #663428;
        border-color: #8a6b5c;
    }
   
    html.skin-theme-clientpref-os .cs-section:nth-child(7) .cs-card {
        background-color: #331a00;
        border-color: #663428;
    }
   
     html.skin-theme-clientpref-os .cs-section:nth-child(7) .cs-card-header {
        background-color: #663428;
        border-color: #8a6b5c;
    }
   
    html.skin-theme-clientpref-os .cs-section:nth-child(7) .cs-card-footer {
        background-color: #331a00;
        border-color: #663428;
    }
   
    /* Community section - OS dark */
     html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-section-header {
        background-color: #3d3d3d;
        border-color: #676767;
    }
   
    html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-card {
        background-color: #171a1d;
        border-color: #3d3d3d;
    }
   
    html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-card-header {
        background-color: #3d3d3d;
        border-color: #676767;
    }
   
    html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-card-footer {
        background-color: #171a1d;
        border-color: #3d3d3d;
    }
}


/* Typography in dark mode */
    /* 7. Community Dark */
html.skin-theme-clientpref-night .cs-title,
     html.skin-theme-clientpref-night .cs-section.comm .cs-section-header,
html.skin-theme-clientpref-os .cs-title {
     html.skin-theme-clientpref-night .cs-section.comm .cs-card-header,
     color: #fff;
    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-subtitle,
html.skin-theme-clientpref-night .cs-stats,
html.skin-theme-clientpref-os .cs-subtitle,
html.skin-theme-clientpref-os .cs-stats {
     color: #ccc;
}
 
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;
}
 
html.skin-theme-clientpref-night .cs-card-list li,
html.skin-theme-clientpref-os .cs-card-list li {
    color: #ccc;
}
 
/* Responsive layout */
@media (max-width: 875px) {
    .cs-grid {
        display: block;
    }
      
      
     .cs-row {
     html.skin-theme-clientpref-night .cs-section.comm .cs-card,
        display: block;
    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; }
      
      
     .cs-cell {
     html.skin-theme-clientpref-night .cs-section.comm .cs-card-footer a,
        display: block;
    html.skin-theme-clientpref-os .cs-section.comm .cs-card-footer a { color: #ccc !important; }
        width: 100%;
        margin-bottom: 15px;
    }
}
}

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; }
}