Skip to content

USACO Mordenize by hinin

Screenshot of USACO Mordenize

Details

Authorhinin

LicenseBSD-v3-Clause

Categoryusaco.org

Created

Updated

Size7.2 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

Modern redesign for USACO platform with enhanced visual hierarchy and interaction.

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle== 
@name         USACO Modernize
@version      0.0
@namespace    github.com/hin1n  
@description  Modern redesign for USACO platform with enhanced visual hierarchy and interaction.
@author       hinin
@license      BSD-v3
==/UserStyle== */
 
@-moz-document domain("usaco.org")  {
    /* 基础变量 */
    :root {
        --primary-color: #2c3e50;
        --secondary-color: #3498db;
        --background-color: #f8f9fa;
        --text-color: #34495e;
        --border-radius: 8px;
        --shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
 
    /* 通用样式增强 */
    body {
        font-family: 'Roboto', 'Segoe UI', sans-serif;
        background: var(--background-color);
        line-height: 1.6;
        color: var(--text-color);
        padding: 20px;
    }
 
    /* 导航栏动态效果 */
    .navbar {
        background: linear-gradient(145deg, 
            var(--primary-color), 
            #1a2833); /* darken(primary-color 15%) */
        border-radius: var(--border-radius);
        margin: 1rem 0;
        box-shadow: var(--shadow);
        transition: transform 0.3s ease;
 
        &:hover {
            transform: translateY(-2px);
        }
 
        ul {
            padding: 0.8rem;
            display: flex;
            justify-content: center;
        }
 
        li {
            list-style: none;
            margin: 0 1.2rem;
            position: relative;
        }
 
        a {
            color: white;
            padding: 0.8rem 1.5rem;
            border-radius: 30px;
            transition: all 0.3s ease;
            font-weight: 500;
 
            &::after {
                content: '';
                position: absolute;
                bottom: -5px;
                left: 50%;
                width: 0;
                height: 2px;
                background: rgba(255,255,255,0.5);
                transition: all 0.3s;
            }
 
            &:hover {
                background: rgba(255,255,255,0.15);
                
                &::after {
                    width: 80%;
                    left: 10%;
                }
            }
        }
    }
 
    /* 智能面板系统 */
    .panel {
        background: white;
        border-radius: var(--border-radius);
        padding: 2rem;
        margin-bottom: 2rem;
        box-shadow: var(--shadow);
        position: relative;
        transition: box-shadow 0.3s ease;
 
        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            border-radius: inherit;
            box-shadow: 0 8px 32px rgba(0,0,0,0.05);
            opacity: 0;
            transition: opacity 0.3s;
        }
 
        &:hover::before {
            opacity: 1;
        }
 
        h2 {
            color: var(--secondary-color);
            border-bottom: 2px solid #a3d5ff; /* lighten(secondary-color 30%) */
            padding-bottom: 1rem;
            margin-bottom: 1.5rem;
            font-size: 1.8rem;
            position: relative;
            
            &::after {
                content: '';
                position: absolute;
                bottom: -2px;
                left: 0;
                width: 50px;
                height: 3px;
                background: var(--secondary-color);
            }
        }
 
        ul {
            padding-left: 1.5rem;
            
            li {
                margin: 1rem 0;
                padding-left: 1rem;
                border-left: 3px solid #cce7ff; /* lighten(secondary-color 40%) */
                transition: transform 0.3s;
                
                &:hover {
                    transform: translateX(10px);
                }
            }
        }
    }
 
    /* 动态按钮系统 */
    .panel[style*="background-color:#FFF;"] button {
        background: var(--secondary-color);
        color: white;
        border: none;
        padding: 0.8rem 1.5rem;
        border-radius: 30px;
        margin: 0.5rem;
        cursor: pointer;
        position: relative;
        overflow: hidden;
        
        &::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(
                120deg,
                transparent,
                rgba(255,255,255,0.3),
                transparent 
            );
            transition: left 0.6s;
        }
 
        &:hover {
            background: #2980b9; /* darken(secondary-color 10%) */
            
            &::before {
                left: 100%;
            }
        }
    }
 
    /* 时间线效果 */
    .panel:has(h2:contains("2024-2025 Schedule")) {
        background: #f5fbff; /* lighten(secondary-color 95%) */
        position: relative;
        padding-left: 2rem;
 
        &::before {
            content: "";
            position: absolute;
            left: 0;
            top: 0;
            width: 4px;
            height: 100%;
            background: var(--secondary-color);
            border-radius: var(--border-radius);
        }
    }
 
    /* 赞助商动效增强 */
    .sponsors {
        a {
            display: inline-block;
            margin: 1rem;
            padding: 1rem;
            background: white;
            border-radius: var(--border-radius);
            position: relative;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
 
            &::after {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                box-shadow: 0 8px 24px rgba(52,152,219,0.2);
                opacity: 0;
                transition: opacity 0.3s;
            }
 
            &:hover {
                transform: translateY(-5px) scale(1.02);
                
                &::after {
                    opacity: 1;
                }
                
                img {
                    filter: none;
                    transform: rotate(-2deg);
                }
            }
        }
 
        img {
            transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
            filter: grayscale(100%);
        }
    }
 
    /* 响应式设计增强 */
    @media (max-width: 768px) {
        .navbar {
            ul {
                flex-direction: column;
                text-align: center;
                
                li {
                    margin: 0.8rem 0;
                }
            }
        }
 
        .panel {
            margin: 1rem;
            padding: 1.5rem;
            
            h2 {
                font-size: 1.5rem;
            }
        }
 
        div[style*="width:300px;"] {
            width: 100% !important;
            margin-top: 1.5rem;
        }
    }
}

Reviews

No reviews yet.