/* 全局样式 */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    transition: background-color 0.5s, color 0.5s;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

header {
    background: #333;
    color: #fff;
    padding-top: 30px;
    min-height: 70px;
    border-bottom: #0779e4 3px solid;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header a {
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 16px;
}

header ul {
    padding: 0;
    margin: 0;
    list-style: none;
    float: right;
}

header li {
    float: left;
    display: inline;
    padding: 0 20px 0 20px;
}

header .logo {
    float: left;
    font-size: 24px;
    font-weight: bold;
}

header nav {
    width: 90%;
    margin: auto;
    overflow: hidden;
}

#theme-switcher {
    float: right;
    margin-left: 20px;
    padding: 5px 10px;
    background: #0779e4;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

/* 深色主题 */
body.dark-theme {
    background-color: #222;
    color: #f4f4f4;
}

body.dark-theme header {
    background: #1a1a1a;
    border-bottom: #1e90ff 3px solid;
}

body.dark-theme #hero {
    background: #2c2c2c;
}

body.dark-theme section {
    background: #333;
    color: #f0f0f0;
    border-bottom: 1px solid #444;
}

body.dark-theme .skill-item, body.dark-theme .project-card {
    background: #3a3a3a;
    box-shadow: 0 5px 15px rgba(255,255,255,0.1);
}

body.dark-theme input[type="text"],
body.dark-theme input[type="email"],
body.dark-theme textarea {
    background-color: #444;
    color: #f0f0f0;
    border: 1px solid #555;
}

body.dark-theme button,
body.dark-theme .project-link {
    background: #1e90ff;
}

body.dark-theme .progress-bar-container {
    background-color: #555;
}

body.dark-theme .progress-bar {
    background-color: #1e90ff;
}

/* Hero Section */
#hero {
    min-height: 400px;
    background: #0779e4 url('placeholder-hero-bg.svg') no-repeat center center/cover;
    color: white;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#hero h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

#hero p {
    font-size: 1.5em;
}

/* Sections */
section {
    padding: 40px 20px;
    border-bottom: 1px solid #ddd;
    background: #fff;
    text-align: center;
}

section h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #333;
}

body.dark-theme section h2 {
    color: #f0f0f0;
}

/* About Section - Story */
.story-container {
    max-width: 800px;
    margin: 0 auto;
}

.story-choices button {
    background: #0779e4;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.story-choices button:hover {
    background: #0056b3;
}

.story-content-area {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
    min-height: 100px;
    text-align: left;
}

body.dark-theme .story-content-area {
    background: #2c2c2c;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.skill-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.skill-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
    /* Placeholder color, replace with actual SVG or img */
    background-color: #0779e4;
    border-radius: 50%;
    display: inline-block;
}

.skill-item h3 {
    margin-bottom: 10px;
    color: #0779e4;
}

.progress-bar-container {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin-top: 10px;
}

.progress-bar {
    height: 20px;
    background-color: #0779e4;
    border-radius: 5px;
    text-align: right;
    padding-right: 5px;
    line-height: 20px;
    color: white;
    font-size: 0.8em;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    /* Placeholder color */
    background-color: #ccc;
}

.project-card h3 {
    padding: 15px 15px 5px 15px;
    margin: 0;
    color: #0779e4;
}

.project-card p {
    padding: 0 15px 15px 15px;
    font-size: 0.9em;
}

.project-link {
    display: inline-block;
    background: #0779e4;
    color: white;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    margin: 0 15px 15px 15px;
    transition: background-color 0.3s;
}

.project-link:hover {
    background: #0056b3;
}

/* Contact Section */
#contact-form {
    max-width: 600px;
    margin: 20px auto;
    display: grid;
    gap: 15px;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

#contact-form textarea {
    resize: vertical;
}

#contact-form button {
    background: #0779e4;
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1em;
    transition: background-color 0.3s;
}

#contact-form button:hover {
    background: #0056b3;
}

.social-links {
    margin-top: 30px;
}

.social-links a {
    color: #0779e4;
    text-decoration: none;
    margin: 0 10px;
    font-size: 1.2em;
}

.social-links a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
}

body.dark-theme footer {
    background: #1a1a1a;
}

footer p {
    margin: 5px 0;
}

/* Responsive Design */
@media(max-width: 768px) {
    header .logo,
    header ul,
    header li {
        float: none;
        text-align: center;
        width: 100%;
    }

    header nav ul {
        margin-top: 10px;
    }

    header nav li {
        padding: 10px 0;
    }

    #theme-switcher {
        float: none;
        display: block;
        margin: 10px auto;
    }

    #hero h1 {
        font-size: 2.5em;
    }

    #hero p {
        font-size: 1.2em;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
}