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


/* Base container */
/* --- 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;
Line 26: Line 29:
     margin: 0;
     margin: 0;
     color: #000;
     color: #000;
    border: none;
}
}


Line 35: Line 39:
}
}


/* Search - FIXED for desktop and mobile */
/* --- 3. SEARCH BAR --- */
.cs-search {
.cs-search {
     max-width: 800px;
     max-width: 800px;
Line 43: Line 47:
     background-color: #f5f5f5;
     background-color: #f5f5f5;
     border: 1px solid #ddd;
     border: 1px solid #ddd;
    box-sizing: border-box;
}
}


/* Fix for MediaWiki inputbox layout */
.cs-search table {
    width: 100%;
    border-spacing: 0;
}
/* Fix for MediaWiki search row spacing */
.cs-search table tr {
    vertical-align: middle;
}
.cs-search table td {
    padding: 0;
}
/* Fix for the first cell containing input - ADJUSTED RATIO */
.cs-search table td:first-child {
    width: 80%; /* Increased from 70% to make input larger */
    padding-right: 10px;
}
/* Fix for the second cell containing button - ADJUSTED RATIO */
.cs-search table td:last-child {
    width: 20%; /* Decreased from 30% to make button smaller */
}
/* Search input styling with better size constraints */
.cs-search .mw-searchInput,
.cs-search input[type="search"],
.cs-search input[type="search"],
.cs-search input[type="text"],
.cs-search .mw-searchInput {
.cs-search .cdx-text-input__input {
    background-color: #ffffff !important;
    border: 1px solid #ddd !important;
     height: 40px !important;
     height: 40px !important;
     padding: 5px 12px !important;
     padding: 5px 12px !important;
     border-radius: 4px;
     border-radius: 4px !important;
    border: 1px solid #ddd;
     font-size: 16px !important;
    box-sizing: border-box !important;
     color: #333 !important;
     font-size: 16px;
    background-color: #e8e8e8;
     color: #333;
     width: 100% !important;
     width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}
}


/* Search button styling */
.cs-search input[type="submit"],
.cs-search input[type="submit"],
.cs-search .oo-ui-buttonElement-button,
.cs-search .oo-ui-buttonElement-button {
.cs-search button {
    min-width: 80px !important;
    background-color: #f0f0f0 !important;
    border: 1px solid #ddd !important;
     height: 40px !important;
     height: 40px !important;
    padding: 5px 10px !important; /* Reduced padding */
     font-weight: 600 !important;
    border-radius: 4px;
     cursor: pointer !important;
    border: 1px solid #ddd;
     color: #333 !important;
    background-color: #f0f0f0;
    color: #333;
    cursor: pointer;
     font-weight: 600;
    box-sizing: border-box;
    display: inline-flex !important;
     align-items: center !important;
     justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    font-size: 15px; /* Slightly smaller font */
    white-space: nowrap;
}
 
.cs-search input[type="submit"]:hover,
.cs-search button:hover {
    background-color: #e0e0e0;
}
}


/* Hide full text button */
.cs-search input[name="fulltext"] { display: none !important; }
.cs-search input[name="fulltext"],
.cs-search button[name="fulltext"],
.cs-search input[value="Search full text"] {
    display: none !important;
}


/* 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: 0 -10px;
}
 
.cs-row {
    display: table-row;
}
 
.cs-cell {
    display: table-cell;
     width: 33.333%;
    vertical-align: top;
}
 
/* Section styling */
.cs-section {
     margin-bottom: 30px;
     margin-bottom: 30px;
}
}


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


/* Card Design */
.cs-card {
.cs-card {
     border-radius: 6px;
     border-radius: 6px;
     overflow: hidden;
     overflow: hidden;
     height: 100%;
     height: 100%;
    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;
}
 
.cs-card-title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
}
 
.cs-card-body {
    padding: 15px;
}
 
.cs-card-list {
    margin: 0;
    padding: 0 0 0 20px;
}
 
.cs-card-list li {
    margin-bottom: 10px;
}
 
/* Card footer with hover effects */
.cs-card-footer {
    padding: 8px 15px;
    text-align: right;
}
 
/* Link hover effects */
.cs-card-footer a {
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: all 0.2s ease-in-out;
}
 
.cs-card-footer a:hover {
    opacity: 0.85;
}
 
.cs-card-footer a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 0;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}
 
.cs-card-footer a:hover::after {
    width: 100%;
}
 
/* Section color schemes */
/* Programming */
.cs-section:nth-child(3) .cs-section-header {
    background-color: #cef2e0;
    border: 1px solid #cef2e0;
}
 
.cs-section:nth-child(3) .cs-card {
    background-color: #f5fffa;
    border: 1px solid #cef2e0;
}
 
.cs-section:nth-child(3) .cs-card-header {
    background-color: #cef2e0;
    border-bottom: 1px solid #cef2e0;
}
 
.cs-section:nth-child(3) .cs-card-footer {
    background-color: #f5fffa;
    border-top: 1px solid #cef2e0;
}
 
.cs-section:nth-child(3) .cs-card-footer a {
    color: #2e8b57;
}
 
/* Data Science */
.cs-section:nth-child(4) .cs-section-header {
    background-color: #cedff2;
    border: 1px solid #cedff2;
}
 
.cs-section:nth-child(4) .cs-card {
    background-color: #f5faff;
    border: 1px solid #cedff2;
}
 
.cs-section:nth-child(4) .cs-card-header {
    background-color: #cedff2;
    border-bottom: 1px solid #cedff2;
}
 
.cs-section:nth-child(4) .cs-card-footer {
    background-color: #f5faff;
    border-top: 1px solid #cedff2;
}
 
.cs-section:nth-child(4) .cs-card-footer a {
    color: #4169e1;
}
 
/* Databases */
.cs-section:nth-child(5) .cs-section-header {
    background-color: #f2cedd;
    border: 1px solid #f2cedd;
}
 
.cs-section:nth-child(5) .cs-card {
    background-color: #fff5fa;
    border: 1px solid #f2cedd;
}
 
.cs-section:nth-child(5) .cs-card-header {
    background-color: #f2cedd;
    border-bottom: 1px solid #f2cedd;
}
 
.cs-section:nth-child(5) .cs-card-footer {
    background-color: #fff5fa;
    border-top: 1px solid #f2cedd;
}
 
.cs-section:nth-child(5) .cs-card-footer a {
    color: #db7093;
}
 
/* Infrastructure */
.cs-section:nth-child(6) .cs-section-header {
    background-color: #ddcef2;
    border: 1px solid #ddcef2;
}
 
.cs-section:nth-child(6) .cs-card {
    background-color: #faf5ff;
    border: 1px solid #ddcef2;
}
 
.cs-section:nth-child(6) .cs-card-header {
    background-color: #ddcef2;
    border-bottom: 1px solid #ddcef2;
}
 
.cs-section:nth-child(6) .cs-card-footer {
    background-color: #faf5ff;
    border-top: 1px solid #ddcef2;
}
 
.cs-section:nth-child(6) .cs-card-footer a {
    color: #8a2be2;
}


/* CS Fundamentals */
.cs-card-header { padding: 12px 15px; }
.cs-section:nth-child(7) .cs-section-header {
.cs-card-title { margin: 0; font-size: 1.1em; font-weight: 600; border: none; }
    background-color: #f2e0ce;
.cs-card-body { padding: 15px; flex-grow: 1; }
    border: 1px solid #f2e0ce;
.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-section:nth-child(7) .cs-card {
/* ========================================================= */
    background-color: #fffaf5;
/* === COLOR THEMES (Light Mode) === */
    border: 1px solid #f2e0ce;
/* ========================================================= */
}


.cs-section:nth-child(7) .cs-card-header {
/* PROGRAMMING (Green) */
    background-color: #f2e0ce;
.cs-section.prog .cs-section-header { background-color: #cef2e0; border: 1px solid #cef2e0; }
    border-bottom: 1px solid #f2e0ce;
.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; }


.cs-section:nth-child(7) .cs-card-footer {
/* DATA SCIENCE (Blue) */
    background-color: #fffaf5;
.cs-section.data .cs-section-header { background-color: #cedff2; border: 1px solid #cedff2; }
    border-top: 1px solid #f2e0ce;
.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; }


.cs-section:nth-child(7) .cs-card-footer a {
/* DATABASES (Pink) */
    color: #d2691e;
.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; }


/* Community */
/* INFRASTRUCTURE (Purple) */
.cs-section:nth-child(8) .cs-section-header {
.cs-section.inf .cs-section-header { background-color: #ddcef2; border: 1px solid #ddcef2; }
    background-color: #eee;
.cs-section.inf .cs-card { background-color: #faf5ff; border-color: #ddcef2; }
    border: 1px solid #eee;
.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-section:nth-child(8) .cs-card {
/* FUNDAMENTALS (Orange) */
    background-color: #f9f9f9;
.cs-section.fund .cs-section-header { background-color: #f2e0ce; border: 1px solid #f2e0ce; }
    border: 1px solid #eee;
.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; }


.cs-section:nth-child(8) .cs-card-header {
/* COMMUNITY (Grey) */
    background-color: #eee;
.cs-section.comm .cs-section-header { background-color: #eee; border: 1px solid #eee; }
    border-bottom: 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; }


.cs-section:nth-child(8) .cs-card-footer {
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}


.cs-section:nth-child(8) .cs-card-footer a {
/* ========================================================= */
    color: #444;
/* === DARK MODE FIX (Citizen Skin) === */
}
/* ========================================================= */


/* Dark mode theme toggle */
@media screen {
@media screen {
     /* Dark mode styles */
     /* 1. Global Components - Dark Mode */
     html.skin-theme-clientpref-night .cs-header,
     html.skin-theme-clientpref-night .cs-header,
     html.skin-theme-clientpref-os .cs-header {
     html.skin-theme-clientpref-os .cs-header {  
         background-color: #171a1d;
         background-color: #171a1d !important;  
         border-color: #676767;
         border-color: #676767 !important;  
     }
     }
     html.skin-theme-clientpref-night .cs-title,
     html.skin-theme-clientpref-night .cs-title,
     html.skin-theme-clientpref-os .cs-title {
     html.skin-theme-clientpref-os .cs-title { color: #fff !important; }
        color: #fff;
    }
 
     html.skin-theme-clientpref-night .cs-subtitle,
     html.skin-theme-clientpref-night .cs-subtitle,
     html.skin-theme-clientpref-os .cs-subtitle {
     html.skin-theme-clientpref-os .cs-subtitle { color: #ccc !important; }
        color: #ccc;
      
     }
 
     html.skin-theme-clientpref-night .cs-search,
     html.skin-theme-clientpref-night .cs-search,
     html.skin-theme-clientpref-os .cs-search {
     html.skin-theme-clientpref-os .cs-search {  
         background-color: #252525;
         background-color: #252525 !important;  
         border-color: #676767;
         border-color: #676767 !important;  
     }
     }
 
     html.skin-theme-clientpref-night .cs-search input,
    html.skin-theme-clientpref-night .cs-search input[type="search"],
     html.skin-theme-clientpref-os .cs-search input {  
     html.skin-theme-clientpref-night .cs-search input[type="text"],
         background-color: #1f1f1f !important;  
    html.skin-theme-clientpref-night .cs-search .cdx-text-input__input,
         color: #fff !important;  
     html.skin-theme-clientpref-os .cs-search input[type="search"],
         border-color: #555 !important;  
    html.skin-theme-clientpref-os .cs-search input[type="text"],
    html.skin-theme-clientpref-os .cs-search .cdx-text-input__input {
         background-color: #1f1f1f;
         color: #fff;
         border-color: #555;
     }
     }
     html.skin-theme-clientpref-night .cs-search input[type="submit"],
     html.skin-theme-clientpref-night .cs-search input[type="submit"],
    html.skin-theme-clientpref-night .cs-search button,
     html.skin-theme-clientpref-os .cs-search input[type="submit"] {  
     html.skin-theme-clientpref-os .cs-search input[type="submit"],
         background-color: #444 !important;  
    html.skin-theme-clientpref-os .cs-search button {
         border-color: #555 !important;  
         background-color: #444;
         color: #fff !important;  
         border-color: #555;
         color: #fff;
     }
     }
 
      
     html.skin-theme-clientpref-night .cs-search input[type="submit"]:hover,
    html.skin-theme-clientpref-night .cs-search button:hover,
    html.skin-theme-clientpref-os .cs-search input[type="submit"]:hover,
    html.skin-theme-clientpref-os .cs-search button:hover {
        background-color: #555;
    }
 
    /* Dark text colors */
     html.skin-theme-clientpref-night .cs-section-title,
     html.skin-theme-clientpref-night .cs-section-title,
     html.skin-theme-clientpref-night .cs-card-title,
     html.skin-theme-clientpref-night .cs-card-title,
     html.skin-theme-clientpref-os .cs-section-title,
     html.skin-theme-clientpref-os .cs-section-title,
     html.skin-theme-clientpref-os .cs-card-title {
     html.skin-theme-clientpref-os .cs-card-title { color: #fff !important; }
        color: #fff;
      
     }
 
     html.skin-theme-clientpref-night .cs-card-list li,
     html.skin-theme-clientpref-night .cs-card-list li,
     html.skin-theme-clientpref-os .cs-card-list li {
     html.skin-theme-clientpref-os .cs-card-list li { color: #ccc !important; }
        color: #ccc;
    }
}
 
/* Dark mode section colors - condensed */
@media screen {
    /* Programming section - dark */
    html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-section-header,
    html.skin-theme-clientpref-os .cs-section:nth-child(3) .cs-section-header {
        background-color: #104437;
        border-color: #104437;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-card,
    html.skin-theme-clientpref-os .cs-section:nth-child(3) .cs-card {
        background-color: #0b1e1c;
        border-color: #104437;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-card-header,
    html.skin-theme-clientpref-os .cs-section:nth-child(3) .cs-card-header {
        background-color: #104437;
        border-color: #104437;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section:nth-child(3) .cs-card-footer {
        background-color: #0b1e1c;
        border-color: #104437;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(3) .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section:nth-child(3) .cs-card-footer a {
        color: #8fbc8f;
    }


     /* Data Science section - dark */
     /* 2. Programming Dark */
    html.skin-theme-clientpref-night .cs-section:nth-child(4) .cs-section-header,
     html.skin-theme-clientpref-night .cs-section.prog .cs-section-header,
    html.skin-theme-clientpref-os .cs-section:nth-child(4) .cs-section-header {
     html.skin-theme-clientpref-night .cs-section.prog .cs-card-header,
        background-color: #082849;
     html.skin-theme-clientpref-os .cs-section.prog .cs-section-header,
        border-color: #082849;
     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:nth-child(4) .cs-card,
    html.skin-theme-clientpref-os .cs-section:nth-child(4) .cs-card {
        background-color: #0d1a27;
        border-color: #082849;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(4) .cs-card-header,
    html.skin-theme-clientpref-os .cs-section:nth-child(4) .cs-card-header {
        background-color: #082849;
        border-color: #082849;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(4) .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section:nth-child(4) .cs-card-footer {
        background-color: #0d1a27;
        border-color: #082849;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(4) .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section:nth-child(4) .cs-card-footer a {
        color: #87cefa;
    }
 
    /* Databases section - dark */
    html.skin-theme-clientpref-night .cs-section:nth-child(5) .cs-section-header,
    html.skin-theme-clientpref-os .cs-section:nth-child(5) .cs-section-header {
        background-color: #882c43;
        border-color: #882c43;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(5) .cs-card,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .cs-section:nth-child(5) .cs-card-header {
        background-color: #882c43;
        border-color: #882c43;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(5) .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section:nth-child(5) .cs-card-footer {
        background-color: #270e1a;
        border-color: #882c43;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(5) .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section:nth-child(5) .cs-card-footer a {
        color: #ffb6c1;
    }
 
    /* Infrastructure section - dark */
    html.skin-theme-clientpref-night .cs-section:nth-child(6) .cs-section-header,
    html.skin-theme-clientpref-os .cs-section:nth-child(6) .cs-section-header {
        background-color: #7545ab;
        border-color: #7545ab;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(6) .cs-card,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .cs-section:nth-child(6) .cs-card-header {
        background-color: #7545ab;
        border-color: #7545ab;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(6) .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section:nth-child(6) .cs-card-footer {
        background-color: #130e20;
        border-color: #7545ab;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(6) .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section:nth-child(6) .cs-card-footer a {
        color: #da70d6;
    }
 
    /* CS Fundamentals section - dark */
     html.skin-theme-clientpref-night .cs-section:nth-child(7) .cs-section-header,
    html.skin-theme-clientpref-os .cs-section:nth-child(7) .cs-section-header {
        background-color: #663428;
        border-color: #663428;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(7) .cs-card,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .cs-section:nth-child(7) .cs-card-header {
        background-color: #663428;
        border-color: #663428;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(7) .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section:nth-child(7) .cs-card-footer {
        background-color: #331a00;
        border-color: #663428;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(7) .cs-card-footer a,
     html.skin-theme-clientpref-os .cs-section:nth-child(7) .cs-card-footer a {
        color: #ffa500;
    }
 
    /* Community section - dark */
    html.skin-theme-clientpref-night .cs-section:nth-child(8) .cs-section-header,
     html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-section-header {
        background-color: #3d3d3d;
        border-color: #3d3d3d;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(8) .cs-card,
    html.skin-theme-clientpref-os .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,
    html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-card-header {
        background-color: #3d3d3d;
        border-color: #3d3d3d;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(8) .cs-card-footer,
    html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-card-footer {
        background-color: #171a1d;
        border-color: #3d3d3d;
    }
    html.skin-theme-clientpref-night .cs-section:nth-child(8) .cs-card-footer a,
    html.skin-theme-clientpref-os .cs-section:nth-child(8) .cs-card-footer a {
        color: #ccc;
    }
}
 
/* OS dark mode detection through prefers-color-scheme */
@media (prefers-color-scheme: dark) {
    /* Dark mode handled through class combinations above */
}
 
/* Responsive layout */
@media (max-width: 875px) {
    .cs-title {
        font-size: 1.8em;
    }
      
      
     .cs-subtitle {
     html.skin-theme-clientpref-night .cs-section.prog .cs-card,
        font-size: 1em;
    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; }
      
      
     .cs-search {
     html.skin-theme-clientpref-night .cs-section.prog .cs-card-footer a,
        padding: 15px;
    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; }
      
      
     /* Stack search form on mobile by changing table layout */
     html.skin-theme-clientpref-night .cs-section.data .cs-card,
     .cs-search table td:first-child,
     html.skin-theme-clientpref-night .cs-section.data .cs-card-footer,
     .cs-search table td:last-child {
    html.skin-theme-clientpref-os .cs-section.data .cs-card,
        display: block;
     html.skin-theme-clientpref-os .cs-section.data .cs-card-footer { background-color: #0d1a27 !important; border-color: #082849 !important; }
        width: 100%;
        padding: 0;
    }
      
      
     .cs-search table td:first-child {
     html.skin-theme-clientpref-night .cs-section.data .cs-card-footer a,
        margin-bottom: 10px;
    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; }
      
      
     /* Convert grid table to blocks on mobile */
     html.skin-theme-clientpref-night .cs-section.db .cs-card,
     .cs-grid {
     html.skin-theme-clientpref-night .cs-section.db .cs-card-footer,
        display: block;
    html.skin-theme-clientpref-os .cs-section.db .cs-card,
        width: 100%;
    html.skin-theme-clientpref-os .cs-section.db .cs-card-footer { background-color: #270e1a !important; border-color: #882c43 !important; }
        margin: 0;
        padding: 0 10px;
        box-sizing: border-box;
    }
      
      
     .cs-row {
     html.skin-theme-clientpref-night .cs-section.db .cs-card-footer a,
        display: block;
    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; }
      
      
     .cs-cell {
     html.skin-theme-clientpref-night .cs-section.inf .cs-card,
        display: block;
    html.skin-theme-clientpref-night .cs-section.inf .cs-card-footer,
        width: 100%;
    html.skin-theme-clientpref-os .cs-section.inf .cs-card,
        margin-bottom: 15px;
    html.skin-theme-clientpref-os .cs-section.inf .cs-card-footer { background-color: #130e20 !important; border-color: #7545ab !important; }
    }
      
      
     .cs-card {
     html.skin-theme-clientpref-night .cs-section.inf .cs-card-footer a,
        width: 100%;
    html.skin-theme-clientpref-os .cs-section.inf .cs-card-footer a { color: #da70d6 !important; }
        margin: 0 0 15px 0;
 
    }
    /* 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; }
      
      
     .cs-section-header {
     html.skin-theme-clientpref-night .cs-section.fund .cs-card,
        text-align: center;
    html.skin-theme-clientpref-night .cs-section.fund .cs-card-footer,
        padding: 10px;
    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-section-title {
     html.skin-theme-clientpref-night .cs-section.fund .cs-card-footer a,
        font-size: 1.2em;
    html.skin-theme-clientpref-os .cs-section.fund .cs-card-footer a { color: #ffa500 !important; }
    }
}


/* Extra small screens */
    /* 7. Community Dark */
@media (max-width: 480px) {
    html.skin-theme-clientpref-night .cs-section.comm .cs-section-header,
     .cs-search {
    html.skin-theme-clientpref-night .cs-section.comm .cs-card-header,
        padding: 10px;
    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; }
      
      
     .cs-card-header,  
     html.skin-theme-clientpref-night .cs-section.comm .cs-card,
     .cs-card-body {
    html.skin-theme-clientpref-night .cs-section.comm .cs-card-footer,
        padding: 10px;
     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-title {
     html.skin-theme-clientpref-night .cs-section.comm .cs-card-footer a,
        font-size: 1.6em;
    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; }
}