/* Theme: Retro Elegant (复古雅致) */
/* Colors: #24221B (Dark Brown), #E4DFD8 (Beige), #F2D04E (Gold) */

/* Global Styles */
body {
    font-family: "Calibri", sans-serif;
    font-size: 18px; /* Increased base font size */
    line-height: 1.6;
    color: #24221B; /* Dark Brown Text */
    background-color: #E4DFD8; /* Beige Background */
    background-image: linear-gradient(#dcd6ce 1px, transparent 1px),
    linear-gradient(90deg, #dcd6ce 1px, transparent 1px);
    background-size: 40px 40px;
    margin: 0;
    padding: 0;
}

a {
    color: #24221B;
    text-decoration: none;
    font-weight: bold;
    border-bottom: 2px solid #F2D04E;
    transition: all 0.2s;
}

a:hover {
    background-color: #F2D04E;
    color: #24221B;
    text-decoration: none;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 50px 80px;
    background-color: #fdfbf7; /* Off-white for content area */
    min-height: 100vh;
    box-shadow: 10px 10px 0px rgba(36, 34, 27, 0.1);
    border: 2px solid #24221B;
}

/* Header */
.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 60px;
    border-bottom: 4px double #24221B;
    padding-bottom: 40px;
}

.profile-info h1 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 3em;
    color: #24221B;
    font-family: "Playfair Display", serif;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.4em;
    color: #24221B;
    margin-bottom: 20px;
    display: block;
    font-family: "Playfair Display", serif;
    font-style: italic;
    font-weight: bold;
    border: none;
    background-color: transparent;
    padding: 0;
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0;
}

.social-links {
    margin-bottom: 20px;
}

.social-links a {
    display: inline-block;
    margin-right: 10px;
    padding: 8px 20px;
    border: 2px solid #24221B;
    color: #24221B;
    font-size: 0.9em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    background-color: transparent;
    text-decoration: none;
}

.social-links a:hover {
    background-color: #24221B;
    color: #F2D04E;
    text-decoration: none;
}

.bio {
    max-width: 600px;
    color: #4a463b;
    font-size: 1.1em;
    font-style: italic;
}

.avatar-placeholder {
    width: 150px;
    height: 150px;
    background-color: #24221B;
    border-radius: 0; /* Square avatar for retro feel */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #F2D04E;
    font-weight: bold;
    font-size: 1.2em;
    border: 2px solid #24221B;
    box-shadow: 8px 8px 0 #F2D04E;
}

.profile-avatar img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 2px solid #24221B;
    box-shadow: 8px 8px 0 #F2D04E;
    display: block;
}

/* Section Titles */
h2 {
    font-size: 2.2em;
    color: #24221B;
    margin-top: 60px;
    margin-bottom: 40px;
    font-family: "Playfair Display", serif;
    font-weight: bold;
    border-left: 8px solid #F2D04E;
    padding-left: 20px;
}

h2::after {
    display: none;
}

/* Game List */
.game-list {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.game-item {
    display: flex;
    flex-direction: row-reverse;
    gap: 0;
    align-items: stretch;
    
    /* Card Styles */
    background-color: #fff;
    border: 2px solid #24221B;
    border-radius: 0;
    padding: 0; /* Reset padding */
    transition: all 0.2s ease;
    box-shadow: 8px 8px 0 #E4DFD8;
}

.game-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: 10px 10px 0 #F2D04E;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column-reverse;
        gap: 20px;
    }
    
    .game-item {
        flex-direction: column-reverse;
    }
    
    .game-image-link {
        width: 100%;
    }
    
    .container {
        margin: 0;
        border: none;
        padding: 20px;
    }
}

.game-content {
    flex: 1;
    padding: 30px; /* Add padding back to content */
    display: flex;
    flex-direction: column;
}

.game-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.8em;
    font-family: "Playfair Display", serif;
}

.game-title a {
    color: #24221B;
    text-decoration: none;
    border-bottom: none;
}

.game-title a:hover {
    background-color: transparent;
    color: #555;
    text-decoration: underline;
    text-decoration-color: #F2D04E;
    text-decoration-thickness: 3px;
}

/* Tags */
.game-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag {
    background-color: #24221B;
    color: #F2D04E;
    padding: 4px 12px;
    border-radius: 0;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tag:nth-child(2n) {
    background-color: #E4DFD8;
    color: #24221B;
    border: 1px solid #24221B;
}

.production-info {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 20px;
    font-family: "Courier New", monospace;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    display: inline-block;
}

.game-description {
    margin-bottom: 30px;
    color: #333;
}

/* Game Image */
.game-image-link {
    flex: 0 0 320px;
    display: block;
    text-decoration: none;
    border-bottom: none;
    border-right: 2px solid #24221B; /* Border between image and content */
}

/* Mobile adjustment for image border */
@media (max-width: 768px) {
    .game-image-link {
        border-right: none;
        border-bottom: 2px solid #24221B;
    }
}

.game-image {
    width: 100%;
    height: 100%;
    min-height: 100%;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 300px; /* Ensure height matches content roughly */
    background-color: #E4DFD8;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #24221B;
    font-family: "Courier New", monospace;
    font-weight: bold;
    transition: all 0.2s;
}

.game-image-link:hover {
    background-color: transparent;
}

.game-image-link:hover .image-placeholder {
    background-color: #F2D04E;
}

/* Buttons */
.game-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-top: auto;
    align-self: flex-end;
}

.play-button {
    display: inline-block;
    background-color: #F2D04E;
    color: #24221B;
    padding: 12px 30px;
    border-radius: 0;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid #24221B;
    box-shadow: 4px 4px 0 #24221B;
    transition: all 0.1s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.play-button:hover {
    background-color: #24221B;
    color: #F2D04E;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
    text-decoration: none;
}

.secondary-link {
    display: inline-block;
    padding: 10px 30px;
    border: 2px solid #24221B;
    color: #24221B;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    font-size: 0.9em;
}

.secondary-link:hover {
    background-color: #24221B;
    color: #F2D04E;
    border-bottom: 2px solid #24221B;
}

/* Experience */
.experience-item {
    margin-bottom: 25px;
    padding: 25px;
    background-color: #fff;
    border: 1px solid #24221B;
    box-shadow: 5px 5px 0 #E4DFD8;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
    color: #24221B;
    font-family: "Playfair Display", serif;
    font-size: 1.1em;
}

footer {
    margin-top: 80px;
    text-align: center;
    color: #666;
    font-size: 0.9em;
    border-top: 1px solid #24221B;
    padding-top: 30px;
    font-family: "Courier New", monospace;
}

/* Project Detail Page Styles */

.home-link {
    color: #24221B;
    text-decoration: none;
    border-bottom: none;
}

.home-link:hover {
    background-color: transparent;
    color: #555;
    text-decoration: none;
}

.detail-image-placeholder {
    width: 100%;
    height: 400px;
    background-color: #E4DFD8;
    border: 2px solid #24221B;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    font-family: "Courier New", monospace;
    font-weight: bold;
    color: #24221B;
    box-shadow: 8px 8px 0 #24221B;
}

.detail-content h3 {
    font-family: "Playfair Display", serif;
    font-size: 1.5em;
    color: #24221B;
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #F2D04E;
    display: inline-block;
}

.detail-content ul {
    list-style-type: square;
    padding-left: 20px;
    margin-bottom: 30px;
}

.detail-content li {
    margin-bottom: 10px;
}

.detail-actions {
    margin-top: 60px;
    padding-top: 0;
    border-top: none;
    display: flex;
    justify-content: center;
}

/* --- New Project Detail Styles --- */

.project-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: none;
}

.project-header h1 {
    font-size: 3em;
    font-family: "Playfair Display", serif;
    margin-bottom: 10px;
    color: #24221B;
    border-left: none;
    padding-left: 0;
    display: block;
    letter-spacing: -0.5px;
}

.project-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}

.project-main-image {
    width: 100%;
    border: 2px solid #24221B;
    box-shadow: 10px 10px 0 #E4DFD8;
    box-sizing: border-box;
}

.project-main-image img {
    width: 100%;
    height: auto;
    display: block;
}

.play-button-large {
    display: inline-block;
    background-color: #F2D04E;
    color: #24221B;
    padding: 15px 40px;
    border-radius: 0;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid #24221B;
    box-shadow: 6px 6px 0 #24221B;
    transition: all 0.1s;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.2em;
    margin-top: 10px;
}

.play-button-large:hover {
    background-color: #24221B;
    color: #F2D04E;
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 #000;
    text-decoration: none;
}

.project-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin: 40px 0;
    padding: 30px;
    border: 2px solid #24221B;
    background: #fff;
    box-shadow: 10px 10px 0 #E4DFD8;
    width: 100%;
    box-sizing: border-box;
}

.info-item {
    background-color: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    transition: none;
}

.info-item:hover {
    transform: none;
    box-shadow: none;
}

.info-item h3 {
    margin-top: 0;
    font-size: 1.1em;
    color: #24221B;
    border-bottom: 2px solid #F2D04E;
    padding-bottom: 8px;
    margin-bottom: 12px;
    font-family: "Playfair Display", serif;
    font-weight: bold;
    display: block;
    text-transform: none;
}

.info-item p {
    margin: 0;
    font-size: 1.1em;
    font-weight: normal;
    color: #24221B;
    font-family: "Calibri", sans-serif;
    line-height: 1.5;
}

.back-link-container {
    margin: 20px 0;
    text-align: left;
}

.back-link {
    display: inline-flex;
    align-items: center;
    font-family: "Courier New", monospace;
    font-weight: bold;
    color: #24221B;
    border-bottom: 2px solid transparent;
}

.back-link::before {
    content: "\2190";
    margin-right: 8px;
    font-size: 1.2em;
}

.back-link:hover {
    border-bottom-color: #F2D04E;
    background-color: transparent;
}

.section-content h2 {
    border-left: 8px solid #F2D04E; /* Yellow accent for sections */
    padding-left: 20px;
}

.subsection h3 {
    font-family: "Playfair Display", serif;
    color: #24221B;
    font-size: 1.4em;
    border-left: none; /* Remove border */
    padding-left: 0;
}

.poem {
    font-family: "Georgia", serif;
    font-style: italic;
    background-color: #fdfbf7;
    padding: 20px;
    border-left: 4px solid #F2D04E; /* Thinner yellow line */
    margin: 20px 0;
    color: #4a463b;
}

.feedback-quote {
    font-family: "Georgia", serif;
    font-style: italic;
    font-size: 1.1em;
    color: #4a463b;
    margin: 15px 0;
    padding-left: 20px;
    border-left: 4px solid #F2D04E; /* Thinner yellow line */
}
/* Content Images */
.content-image-container {
    margin: 30px 0;
    text-align: center;
}

.content-image-container img {
    max-width: 100%;
    height: auto;
    border: 2px solid #24221B;
    box-shadow: 8px 8px 0 #E4DFD8;
    display: block;
    margin: 0 auto;
}

.image-caption {
    margin-top: 10px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}


/* Sidebar Layout */
.project-content-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    position: relative;
}

.project-sidebar {
    width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: 40px;
    padding-right: 20px;
    border-right: 2px solid #E4DFD8;
}

.project-content-main {
    flex: 1;
    min-width: 0;
}

/* Sidebar Nav */
.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 15px;
}

.sidebar-nav a {
    display: block;
    color: #666;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    text-decoration: none;
    border-bottom: none;
    transition: all 0.3s;
    padding-left: 10px;
    border-left: 2px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #24221B;
    border-left-color: #F2D04E;
    background-color: transparent;
    padding-left: 15px;
    font-weight: bold;
}

@media (max-width: 900px) {
    .project-content-wrapper {
        flex-direction: column;
    }
    .project-sidebar {
        width: 100%;
        position: static;
        border-right: none;
        border-bottom: 2px solid #E4DFD8;
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .project-sidebar {
        display: none; /* Hide sidebar on mobile for simplicity, or keep it */
    }
}


/* New Layout for Sidebar */
.main-layout {
    /* Removed flex to allow container to center naturally */
    position: relative;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.left-sidebar {
    width: 260px;
    position: fixed; /* Fixed position to stay on screen */
    bottom: 40px;    /* Anchored to the bottom */
    left: 40px;      /* Anchored to the left */
    top: auto;       /* Reset top */
    z-index: 100;    /* Ensure it's above background */
    padding-top: 0;
}

/* Adjust Container to be centered */
.container {
    max-width: 900px;
    margin: 40px auto; /* Center the container */
    position: relative;
    z-index: 1;
}

/* Sidebar Nav Styling */
.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 18px;
}

.sidebar-nav a {
    display: block;
    color: #666;
    font-family: 'Courier New', monospace;
    font-size: 1em;
    text-decoration: none;
    border-bottom: none;
    transition: all 0.3s;
    padding-left: 15px;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #24221B;
    border-left-color: #F2D04E;
    background-color: transparent;
    padding-left: 20px;
    font-weight: bold;
}

/* Scroll Margin for Sections */
.section-content {
    scroll-margin-top: 60px; /* Ensures title is not cut off */
}

/* Responsive */
@media (max-width: 1100px) {
    .main-layout {
        flex-direction: column;
        align-items: center;
    }
    
    .left-sidebar {
        display: none; /* Hide sidebar on smaller screens */
    }
    
    .container {
        width: 100%;
        margin: 20px auto;
    }
}


/* Content Link Wrapper for Index Page */
.content-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    border-bottom: none;
    padding: 10px;
    margin: -10px; /* Offset padding to keep alignment */
    border-radius: 4px;
    transition: background-color 0.2s;
    font-weight: normal; /* Do not bold the text */
}

.content-link-wrapper:hover {
    background-color: transparent; /* Remove background hover effect */
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.content-link-wrapper:hover .game-description {
    text-decoration: underline;
    text-decoration-color: #F2D04E;
    text-decoration-thickness: 3px;
    color: #555;
}

.content-link-wrapper .game-description {
    color: #333; /* Ensure text color stays consistent */
}

/* Sidebar Back Button */
.sidebar-back-link {
    display: block;
    margin-bottom: 20px;
    padding-left: 10px; /* Align with list items */
    font-weight: bold;
    font-size: 0.9em;
    color: #24221B;
    border-bottom: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap; /* Prevent text wrapping */
}

.sidebar-back-link:hover {
    color: #F2D04E;
    background-color: transparent;
}

/* About Button */
.about-button {
    display: inline-block;
    background-color: #F2D04E; /* Yellow background, same as Play button */
    color: #24221B;
    padding: 14px 36px; /* Slightly bigger padding */
    border-radius: 0;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid #24221B;
    box-shadow: 4px 4px 0 #24221B;
    transition: all 0.1s;
    margin-left: 15px; /* Add some space between buttons */
    text-transform: uppercase; /* Match Play button style */
    letter-spacing: 1px;
}

.about-button:hover {
    background-color: #24221B;
    color: #F2D04E; /* Yellow text on hover */
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
    text-decoration: none;
}


/* Retro Split Button Group */
.retro-btn-group {
    display: inline-flex;
    box-shadow: 4px 4px 0 #24221B;
    transition: transform 0.1s, box-shadow 0.1s;
}

.retro-btn-group:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #000;
}

.btn-half {
    display: inline-block;
    padding: 12px 24px;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #24221B;
    transition: background-color 0.2s, color 0.2s;
    font-size: 0.95em;
    border-top: 2px solid #24221B;
    border-bottom: 2px solid #24221B;
}

.btn-half.play {
    background-color: #F2D04E; /* Yellow */
    border-left: 2px solid #24221B;
    border-right: 1px solid #24221B; /* Half divider */
}

.btn-half.about {
    background-color: #E4DFD8; /* Beige for contrast against white card */
    color: #24221B;
    border-left: 1px solid #24221B; /* Half divider */
    border-right: 2px solid #24221B;
}

.btn-half.about:hover {
    background-color: #24221B;
    color: #F2D04E;
    text-decoration: none;
}

.btn-half:hover {
    background-color: #24221B;
    color: #F2D04E;
    text-decoration: none;
}


.pdf-button-large {
    display: inline-block;
    background-color: #E4DFD8;
    color: #24221B;
    padding: 15px 40px;
    border-radius: 0;
    font-weight: bold;
    text-decoration: none;
    border: 2px solid #24221B;
    box-shadow: 6px 6px 0 #24221B;
    transition: all 0.1s;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1.2em;
    margin-top: 10px;
    margin-left: 20px;
}

.pdf-button-large:hover {
    background-color: #24221B;
    color: #F2D04E;
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 #000;
    text-decoration: none;
}


/* Large Split Button Group for Project Details */
.retro-btn-group-large {
    display: inline-flex;
    box-shadow: 6px 6px 0 #24221B;
    transition: transform 0.1s, box-shadow 0.1s;
    margin-top: 20px;
}

.retro-btn-group-large:hover {
    transform: translate(2px, 2px);
    box-shadow: 3px 3px 0 #000;
}

.btn-half-large {
    display: inline-block;
    padding: 15px 40px;
    font-family: "Calibri", sans-serif; /* Use body font */
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #24221B;
    transition: background-color 0.2s, color 0.2s;
    font-size: 1.2em;
    border-top: 2px solid #24221B;
    border-bottom: 2px solid #24221B;
}

.btn-half-large.play {
    background-color: #F2D04E;
    border-left: 2px solid #24221B;
    border-right: 1px solid #24221B;
}

.btn-half-large.pdf {
    background-color: #E4DFD8;
    color: #24221B;
    border-left: 1px solid #24221B;
    border-right: 2px solid #24221B;
}

.btn-half-large.pdf:hover {
    background-color: #24221B;
    color: #F2D04E;
    text-decoration: none;
}

.btn-half-large:hover {
    background-color: #24221B;
    color: #F2D04E;
    text-decoration: none;
}


/* Video Thumbnail Styles */
.video-thumbnail-container {
    position: relative;
    display: block;
    border-bottom: none !important; /* Remove default link border */
    overflow: hidden; /* Keep image contained */
}

.video-thumbnail-container img {
    display: block;
    width: 100%;
    transition: transform 0.5s ease, filter 0.3s ease;
    filter: brightness(0.6); /* Initial dark mask */
}

.video-thumbnail-container:hover img {
    filter: brightness(0.85); /* Mask becomes lighter but still exists */
    transform: scale(1.02);
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 80px;
    height: 80px;
    background-color: rgba(36, 34, 27, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #F2D04E;
    box-shadow: 0 0 20px rgba(0,0,0,0.6);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
    z-index: 10;
}

.play-overlay span {
    color: #F2D04E;
    font-size: 36px;
    margin-left: 6px; /* Optical adjustment */
    transition: color 0.3s;
}

.video-thumbnail-container:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1.15);
    background-color: #F2D04E;
    border-color: #24221B;
    box-shadow: 0 0 30px rgba(242, 208, 78, 0.6);
}

.video-thumbnail-container:hover .play-overlay span {
    color: #24221B;
}

