/* 
 * Singularity Games Website Styles
 * Main stylesheet for Singularity Games website
 */

/* ===== Base Styles ===== */
:root {
    /* Color Variables */
    --primary-color: #E84E1B;    /* 橘红色 */
    --secondary-color: #FFCC80;  /* 淡橘黄色 */
    --accent-color: #ff6b6b;
    --dark-color: #5D4037;       /* 深棕色，与橘黄色搭配 */
    --light-color: #FFF8E1;      /* 淡黄色背景 */
    --text-color: #333;
    --text-light: #777;
    --white: #ffffff;
    --black: #000000;
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    
    /* Language Switcher Colors */
    --lang-active-bg: var(--primary-color);
    --lang-active-text: var(--white);
    --lang-hover-bg: var(--secondary-color);
    --lang-hover-text: var(--white);
    --lang-border: var(--primary-color);
    
    /* Typography */
    --body-font: 'Helvetica Neue', Arial, sans-serif;
    --heading-font: 'Helvetica Neue', Arial, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;
    
    /* Border Radius */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-color);
    opacity: 0;
    transition: opacity 0.5s ease;
}

body.loaded {
    opacity: 1;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    box-shadow: var(--shadow-md);
    color: var(--white);
    /* 移除悬停时的位移效果 */
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
    /* 移除悬停时的位移效果 */
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    padding: 0.5rem 1.25rem;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* ===== Header ===== */
header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    display: flex;
    align-items: center;
}

.logo-text {
    margin-left: 1rem;
    display: flex;
    flex-direction: column;
}

.logo-text-jp {
    font-size: 1rem;
    color: var(--primary-color);
    text-decoration: underline;
    margin-bottom: 0.2rem;
}

.logo-text-en-cn {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: underline;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 5px;
    margin-left: 20px;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--lang-border);
    color: var(--primary-color);
    padding: 5px 10px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all var(--transition-normal);
}

.lang-btn.active {
    background: var(--lang-active-bg);
    color: var(--lang-active-text);
}

.lang-btn:hover {
    background: var(--lang-hover-bg);
    color: var(--lang-hover-text);
}

@media (max-width: 768px) {
    .logo-text-jp {
        display: none;
    }
    
    .logo-text-en-cn {
        visibility: hidden;
        position: relative;
    }
    
    .logo-text-en-cn::after {
        content: "Singularity Games";
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
        font-size: 0.9rem;
        color: var(--primary-color);
        text-decoration: underline;
    }
    
    .language-switcher {
        position: absolute;
        top: 70px;
        right: 20px;
        z-index: 1001;
    }
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: var(--spacing-md);
    position: relative;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 600;
    padding: 0.5rem;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transition: width var(--transition-normal);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius-sm);
    z-index: 1;
    padding: var(--spacing-xs);
}

.dropdown-content a {
    display: block;
    padding: var(--spacing-xs) var(--spacing-sm);
    color: var(--text-color);
    font-weight: 400;
}

.dropdown-content a:hover {
    background-color: var(--light-color);
    border-radius: var(--border-radius-sm);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
    text-align: center;
    padding-top: 80px; /* Header height */
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--white);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-lg);
    color: var(--light-color);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
}

/* ===== Products Section ===== */
.products {
    padding: var(--spacing-xl) 0;
    background-color: var(--white);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

/* 产品图片轮播样式 */
.product-image-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.product-image-slider img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.product-image-slider img.active {
    opacity: 1;
    z-index: 1;
}

.slider-controls {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color var(--transition-normal);
}

.slider-dot.active {
    background-color: var(--white);
}

/* Image hover effect is now handled by JavaScript for smoother animation */

.product-info {
    padding: var(--spacing-md);
    text-align: center;
}

.product-info h3 {
    margin-bottom: var(--spacing-xs);
}

.product-info p {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

/* ===== Features Section ===== */
.features {
    padding: var(--spacing-xl) 0;
    background-color: var(--light-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.feature {
    text-align: center;
    padding: var(--spacing-md);
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal);
}

.feature:hover {
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary-color);
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== CTA Section ===== */
.cta {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
}

.cta h2 {
    color: var(--white);
    margin-bottom: var(--spacing-sm);
}

.cta p {
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.cta .btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.cta .btn-primary:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

/* ===== Footer ===== */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    margin-bottom: var(--spacing-sm);
}

.footer-logo img {
    height: 50px;
    width: auto;
    display: block;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all var(--transition-normal);
}

.social-links a:hover {
    background-color: var(--primary-color);
}

.footer-links h3,
.footer-contact h3 {
    color: var(--white);
    margin-bottom: var(--spacing-md);
    position: relative;
    padding-bottom: var(--spacing-xs);
}

.footer-links h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
}

.footer-links ul li {
    margin-bottom: var(--spacing-xs);
}

.footer-links ul li a {
    color: var(--light-color);
    transition: color var(--transition-fast);
}

.footer-links ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
}

.footer-contact p i {
    margin-right: var(--spacing-xs);
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== Animation Styles ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

.btn:hover {
    /* 移除悬停动画 */
}

.logo a:hover {
    /* 移除悬停动画 */
}

.cta .btn-primary:hover {
    /* 移除悬停动画 */
}

/* ===== Responsive Styles ===== */
@media (max-width: 992px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    header .container {
        height: 70px;
    }
    
    nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: var(--white);
        box-shadow: var(--shadow-md);
        transition: left var(--transition-normal);
        z-index: 999;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        padding: var(--spacing-md);
    }
    
    nav ul li {
        margin: 0 0 var(--spacing-sm) 0;
    }
    
    .dropdown-content {
        position: static;
        display: none;
        box-shadow: none;
        padding-left: var(--spacing-md);
    }
    
    .dropdown.active .dropdown-content {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 120px 0 var(--spacing-xl);
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .product-grid,
    .features-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    :root {
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        margin-bottom: var(--spacing-md);
    }
}
