/*
Theme Name: KYLOE Pixel Theme
Theme URI: https://kyloe.cn
Author: KYLOE Team
Author URI: https://kyloe.cn
Description: 马里奥像素风格的数字生命服务官网主题 - Mario Pixel Art Style Theme for Digital Life Services
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kyloe-pixel
*/

/* ============================================
   KYLOE PIXEL THEME - 马里奥像素风格
   数字生命服务官网
   ============================================ */

/* CSS Variables - Theme Colors */
:root {
    /* Mario Classic Colors */
    --mario-red: #E52521;
    --mario-blue: #0055B3;
    --mario-green: #00A800;
    --mario-yellow: #FBD000;
    --mario-brown: #8B4513;
    --mario-skin: #FFCBA4;
    
    /* Dark Theme (Default) */
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f0f23;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: var(--mario-red);
    --accent-secondary: var(--mario-blue);
    --accent-success: var(--mario-green);
    
    /* Pixel Border */
    --pixel-size: 4px;
    --border-pixel: 4px solid;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f0f0f0;
    --bg-secondary: #e0e0e0;
    --bg-tertiary: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #666666;
}

/* ============================================
   BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Press Start 2P';
    src: url('https://fonts.gstatic.com/s/pressstart2p/v15/e3t4euO8St-6X6Nq8x2qK3dmDg.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Press Start 2P', cursive, monospace;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 14px;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Pixel Border Effect */
.pixel-border {
    border: var(--pixel-size) solid var(--mario-red);
    box-shadow: 
        var(--pixel-size) var(--pixel-size) 0 0 var(--mario-blue),
        calc(var(--pixel-size) * 2) calc(var(--pixel-size) * 2) 0 0 var(--mario-green);
}

.pixel-box {
    background: var(--bg-secondary);
    border: 4px solid var(--text-primary);
    box-shadow: 
        inset -4px -4px 0 0 rgba(0,0,0,0.3),
        inset 4px 4px 0 0 rgba(255,255,255,0.1);
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
    background: var(--bg-tertiary);
    border-bottom: 4px solid var(--mario-red);
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pixel-logo {
    width: 48px;
    height: 48px;
    background: var(--mario-red);
    border: 4px solid var(--mario-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    animation: pixel-pulse 2s infinite;
}

@keyframes pixel-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.site-title {
    font-size: 24px;
    color: var(--mario-yellow);
    text-shadow: 
        2px 2px 0 var(--mario-red),
        4px 4px 0 var(--mario-blue);
    letter-spacing: 2px;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 12px;
    padding: 10px 15px;
    border: 3px solid transparent;
    transition: all 0.2s;
    text-transform: uppercase;
}

.main-nav a:hover {
    color: var(--mario-yellow);
    border-color: var(--mario-red);
    background: rgba(229, 37, 33, 0.1);
}

/* Theme Toggle */
.theme-toggle {
    background: var(--bg-secondary);
    border: 3px solid var(--mario-green);
    color: var(--text-primary);
    padding: 10px 15px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: all 0.2s;
}

.theme-toggle:hover {
    background: var(--mario-green);
    color: var(--bg-primary);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: 
        linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

/* Pixel Stars Background */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, var(--mario-yellow), transparent),
        radial-gradient(2px 2px at 40px 70px, var(--mario-red), transparent),
        radial-gradient(2px 2px at 50px 160px, var(--mario-green), transparent),
        radial-gradient(2px 2px at 90px 40px, var(--mario-blue), transparent),
        radial-gradient(2px 2px at 130px 80px, var(--mario-yellow), transparent),
        radial-gradient(2px 2px at 160px 120px, var(--mario-red), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 4s infinite;
    opacity: 0.6;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.3; }
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 900px;
    padding: 40px;
}

.hero-title {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--mario-yellow);
    text-shadow: 
        4px 4px 0 var(--mario-red),
        8px 8px 0 var(--mario-blue);
    animation: title-bounce 1s ease-out;
}

@keyframes title-bounce {
    0% { transform: translateY(-50px); opacity: 0; }
    60% { transform: translateY(10px); }
    100% { transform: translateY(0); opacity: 1; }
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 2;
}

.pixel-button {
    display: inline-block;
    background: var(--mario-red);
    color: white;
    padding: 15px 40px;
    font-family: inherit;
    font-size: 14px;
    text-decoration: none;
    border: 4px solid var(--mario-yellow);
    box-shadow: 
        4px 4px 0 0 var(--mario-blue),
        8px 8px 0 0 var(--mario-green);
    transition: all 0.1s;
    text-transform: uppercase;
    cursor: pointer;
}

.pixel-button:hover {
    transform: translate(2px, 2px);
    box-shadow: 
        2px 2px 0 0 var(--mario-blue),
        4px 4px 0 0 var(--mario-green);
}

/* ============================================
   SERVICES SECTION
   ============================================ */

.services-section {
    padding: 100px 20px;
    background: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 32px;
    color: var(--mario-yellow);
    margin-bottom: 60px;
    text-shadow: 3px 3px 0 var(--mario-red);
}

.services-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-card {
    background: var(--bg-tertiary);
    border: 4px solid var(--mario-blue);
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    background: linear-gradient(45deg, var(--mario-red), var(--mario-blue), var(--mario-green));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s;
}

.service-card:hover::before {
    opacity: 0.3;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--mario-yellow);
}

.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--mario-green);
    border: 4px solid var(--mario-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.service-title {
    font-size: 18px;
    color: var(--mario-yellow);
    margin-bottom: 15px;
}

.service-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 2;
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.about-section {
    padding: 100px 20px;
    background: var(--bg-primary);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 28px;
    color: var(--mario-yellow);
    margin-bottom: 30px;
    text-shadow: 3px 3px 0 var(--mario-red);
}

.about-text p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 2.2;
    margin-bottom: 20px;
}

.pixel-art-display {
    background: var(--bg-secondary);
    border: 4px solid var(--mario-red);
    padding: 40px;
    text-align: center;
}

.pixel-character {
    font-size: 80px;
    animation: character-idle 1s infinite;
}

@keyframes character-idle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--bg-tertiary);
    border-top: 4px solid var(--mario-blue);
    padding: 60px 20px 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-size: 32px;
    color: var(--mario-yellow);
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 var(--mario-red);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--mario-yellow);
}

/* ICP 备案信息 */
.icp-info {
    font-size: 10px;
    color: var(--text-secondary);
    padding: 20px;
    border-top: 2px solid var(--bg-secondary);
    margin-top: 40px;
}

.icp-info a {
    color: var(--mario-green);
    text-decoration: none;
}

.icp-info a:hover {
    color: var(--mario-yellow);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 20px;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 12px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 24px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.text-yellow { color: var(--mario-yellow); }
.text-red { color: var(--mario-red); }
.text-green { color: var(--mario-green); }
.text-blue { color: var(--mario-blue); }

.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
.mt-40 { margin-top: 40px; }

/* Pixel Animation Classes */
.animate-bounce {
    animation: pixel-bounce 0.5s infinite;
}

@keyframes pixel-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-shake {
    animation: pixel-shake 0.3s infinite;
}

@keyframes pixel-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Loading Screen */
.pixel-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-content {
    text-align: center;
}

.loader-text {
    font-size: 24px;
    color: var(--mario-yellow);
    animation: loader-blink 0.5s infinite;
}

@keyframes loader-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--mario-red);
    border: 2px solid var(--mario-yellow);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mario-yellow);
}
