/* 基本樣式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* 页面加载动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

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

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 动画类 */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-up.animate {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.slide-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

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

/* 頭部樣式 */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideDownHeader 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(0,123,255,0.1);
}

@keyframes slideDownHeader {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0,0,0,0.15);
    border-bottom-color: rgba(0,123,255,0.25);
    padding: 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    position: relative;
    transition: padding 0.3s;
}

header.scrolled .container {
    padding: 15px 0;
}

/* 移動端適配 */
@media(max-width: 768px) {
    header .container {
        padding: 15px 0;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .logo-text {
        font-size: 22px;
        letter-spacing: 2px;
    }
    
    .logo-subtitle {
        font-size: 8px;
        letter-spacing: 2px;
    }
    
    nav ul li a {
        font-size: 14px;
        padding: 6px 12px;
    }
}

.logo {
    display: flex;
    align-items: center;
    z-index: 10;
}

.logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 8px 15px;
    border-radius: 8px;
}

.logo-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0,123,255,0.1), rgba(0,86,179,0.05));
    opacity: 0;
    transition: opacity 0.3s;
}

.logo-link:hover::before {
    opacity: 1;
}

.logo-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 10px;
    color: #fff;
    font-size: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
    animation: logoIconFloat 3s ease-in-out infinite;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: logoIconShine 3s ease-in-out infinite;
}

.logo-icon i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s;
}

.logo-link:hover .logo-icon {
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}

.logo-link:hover .logo-icon i {
    transform: scale(1.2);
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 50%, #007bff 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
    line-height: 1.1;
    position: relative;
    animation: gradientShift 4s ease infinite;
    transition: all 0.3s;
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

.logo-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #007bff, transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.logo-link:hover .logo-text {
    transform: translateY(-2px);
    animation-duration: 2s;
}

.logo-link:hover .logo-text::after {
    opacity: 1;
}

.logo-subtitle {
    font-size: 10px;
    font-weight: 700;
    color: #666;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0.7;
    transition: all 0.3s;
    font-family: 'Arial', sans-serif;
}

.logo-link:hover .logo-subtitle {
    color: #007bff;
    opacity: 1;
    letter-spacing: 5px;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes logoIconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

@keyframes logoIconShine {
    0%, 100% {
        transform: translate(-50%, -50%) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) rotate(180deg);
        opacity: 0.5;
    }
}
}

nav ul {
    display: flex;
    flex-direction: row;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

nav ul li {
    margin-left: 30px;
    position: relative;
    animation: fadeInNav 0.6s ease-out both;
}

nav ul li:first-child {
    margin-left: 0;
}

nav ul li:nth-child(1) { animation-delay: 0.1s; }
nav ul li:nth-child(2) { animation-delay: 0.2s; }
nav ul li:nth-child(3) { animation-delay: 0.3s; }
nav ul li:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInNav {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 8px 15px;
    border-radius: 6px;
    display: inline-block;
    letter-spacing: 0.5px;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

nav ul li a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,123,255,0.1), rgba(0,86,179,0.05));
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s;
}

nav ul li a:hover::after {
    opacity: 1;
}

nav ul li a:hover {
    color: #007bff;
    transform: translateY(-2px);
}

nav ul li a:hover::before {
    width: calc(100% - 30px);
}

nav ul li a.active {
    color: #007bff;
    background: linear-gradient(135deg, rgba(0,123,255,0.1), rgba(0,86,179,0.05));
}

nav ul li a.active::before {
    width: calc(100% - 30px);
}

nav ul li a.active::after {
    opacity: 1;
}

/* 移動端菜單按鈕 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
    background: none;
    border: none;
    outline: none;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #007bff;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* 旋轉動畫 */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* active样式已在上方定义 */

/* 主要內容區域 */
main {
    margin-top: 100px;
}

/* 首頁英雄區域 */
.hero {
    background: linear-gradient(-45deg, #007bff, #0056b3, #007bff, #0056b3);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    margin-top: 0;
    border-radius: 0 0 20px 20px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 20%) var(--mouse-y, 50%), rgba(255,255,255,0.15) 0%, transparent 50%),
                radial-gradient(circle at calc(100% - var(--mouse-x, 20%)) calc(100% - var(--mouse-y, 50%)), rgba(255,255,255,0.1) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
    transition: background 0.3s ease;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero .container {
    max-width: 800px;
}

.hero-tagline {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
    animation: slideUp 0.8s ease-out 0.2s both;
}

.tagline-line {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: 8px;
    text-transform: uppercase;
    margin: 5px 0;
    opacity: 0.9;
    animation: fadeIn 0.8s ease-out 0.3s both;
}

.tagline-main {
    font-size: 64px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 10px 0;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
    animation: slideUp 0.8s ease-out 0.4s both;
}

.hero-subtitle {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
    font-weight: 400;
    animation: slideUp 0.8s ease-out 0.6s both;
}

.hero-buttons {
    animation: slideUp 0.8s ease-out 0.8s both;
}

@media(max-width: 768px) {
    .tagline-line {
        font-size: 20px;
        letter-spacing: 4px;
    }
    
    .tagline-main {
        font-size: 36px;
        letter-spacing: 2px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
}

.btn {
    display: inline-block;
    background-color: #fff;
    color: #007bff;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #fff;
    cursor: pointer;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    background-color: transparent;
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(-1px) scale(1.02);
}

.btn-outline {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
    margin-left: 15px;
}

.btn-outline:hover {
    background-color: #fff;
    color: #007bff;
}

/* 特色服務區域 */
.features {
    padding: 100px 0;
    background-color: #fff;
    position: relative;
}

.features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,123,255,0.3), transparent);
}

.features .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.feature-box {
    flex: 1;
    min-width: 300px;
    margin: 20px;
    padding: 40px 30px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #eee;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.feature-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,123,255,0.1), transparent);
    transition: left 0.5s;
}

.feature-box:hover::before {
    left: 100%;
}

.feature-box:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,123,255,0.2);
    border-color: #007bff;
}

.feature-box i {
    font-size: 48px;
    color: #007bff;
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.feature-box:hover i {
    transform: scale(1.2) rotateY(360deg);
    color: #0056b3;
}

.feature-box h3 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 22px;
}

.feature-box p {
    color: #666;
    font-size: 16px;
}

/* 區塊標題樣式 */
.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-label {
    display: block;
    font-size: 14px;
    color: #007bff;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-header h2 {
    color: #333;
    font-size: 42px;
    font-weight: 700;
    margin: 0;
    position: relative;
    padding-bottom: 20px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #007bff, transparent);
}

.section-description {
    text-align: center;
    font-size: 18px;
    color: #666;
    max-width: 800px;
    margin: 0 auto 50px;
    line-height: 1.8;
}

.section-footer {
    text-align: center;
    margin-top: 50px;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-link:hover {
    color: #0056b3;
    transform: translateX(5px);
}

.btn-link i {
    transition: transform 0.3s;
}

.btn-link:hover i {
    transform: translateX(5px);
}

/* 遊戲展示區域 */
.games {
    padding: 100px 0;
    background-color: #f8f9fa;
}

/* 新聞動態區域 */
.news {
    padding: 100px 0;
    background-color: #fff;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.news-card {
    background: #f8f9fa;
    padding: 40px 30px;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #007bff, #0056b3);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.news-card:hover::before {
    transform: scaleY(1);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,123,255,0.15);
}

.news-date {
    margin-bottom: 20px;
}

.news-year {
    font-size: 14px;
    color: #007bff;
    font-weight: 600;
    letter-spacing: 1px;
}

.news-card h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.news-card p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 15px;
}

.news-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.news-link:hover {
    color: #0056b3;
    gap: 12px;
}

.news-link i {
    transition: transform 0.3s;
}

.news-link:hover i {
    transform: translateX(5px);
}

/* 公司生活區域 */
.company-life {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
}

.life-content {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.life-text {
    flex: 1;
    min-width: 300px;
}

.life-text .section-header {
    text-align: left;
    margin-bottom: 30px;
}

.life-text .section-header h2::after {
    left: 0;
    transform: none;
}

.life-text p {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 40px;
}

.life-features {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.life-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.life-feature:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.15);
}

.life-feature i {
    font-size: 24px;
    color: #007bff;
}

.life-feature span {
    font-weight: 600;
    color: #333;
}

.life-images {
    flex: 1;
    min-width: 300px;
    display: none; /* 暫時隱藏團隊生活照片 */
}

.life-image-placeholder {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 60px 40px;
    text-align: center;
    border: 2px dashed #ddd;
    transition: all 0.3s;
}

.life-image-placeholder:hover {
    border-color: #007bff;
    background: #fff;
}

.life-image-placeholder p {
    margin-top: 20px;
    color: #999;
    font-size: 14px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.game-card {
    background: #fff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

.game-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,123,255,0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.game-card:hover::after {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 35px rgba(0,123,255,0.25);
    border-color: #007bff;
}

.game-card .game-image {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover .game-image {
    transform: scale(1.1) rotate(5deg);
}

.game-card:hover .game-image i {
    animation: pulse 1s ease-in-out infinite;
}

.game-image {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.game-card h3 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 22px;
}

.game-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
}

/* 頁面內容區域 */
.page-content {
    padding: 120px 0 80px;
    background-color: #fff;
    min-height: 60vh;
}

.page-content .container {
    max-width: 800px;
}

.page-content h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #007bff;
    font-size: 36px;
    position: relative;
    padding-bottom: 15px;
}

.page-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #007bff;
}

.page-content h3 {
    margin: 30px 0 15px;
    color: #007bff;
    font-size: 24px;
}

.page-content p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #555;
    line-height: 1.8;
}

/* 服務頁面 */
.service {
    margin-bottom: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #007bff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.service h3 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 22px;
}

.service p {
    color: #666;
    line-height: 1.8;
}

/* 聯繫我們頁面 */
.contact-info {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.contact-item {
    flex: 1;
    min-width: 250px;
    margin: 15px;
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.contact-item:hover {
    transform: translateY(-5px);
}

.contact-item i {
    font-size: 48px;
    color: #007bff;
    margin-bottom: 20px;
}

.contact-item h3 {
    color: #007bff;
    margin-bottom: 15px;
    font-size: 22px;
}

.contact-item p {
    color: #666;
    font-size: 16px;
}

/* 聯繫表單 */
.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background: #f8f9fa;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* 表單消息樣式 */
.form-message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    animation: slideDown 0.3s ease-out;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 按鈕禁用狀態 */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* 頁腳 */
footer {
    background-color: #2a2a2a;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-block;
}

.footer-section ul li a:hover {
    color: #007bff;
    transform: translateX(5px);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
    color: #999;
}

.back-to-top {
    background: #007bff;
    color: #fff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}

.back-to-top:active {
    transform: translateY(-1px);
}

@media(max-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

/* 公司簡介區域 */
.about-company {
    padding: 100px 0;
    background-color: #fff;
}

.about-company .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 300px;
    padding: 0 20px;
}

.about-text h2 {
    color: #007bff;
    margin-bottom: 20px;
    font-size: 36px;
}

.about-text p {
    color: #666;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    padding: 0 20px;
    text-align: center;
}

.about-image img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}



/* 性能優化：減少重繪 */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 優化動畫性能 */
.feature-box,
.game-card,
.contact-item {
    will-change: transform;
}

/* 背景裝飾動畫 */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,123,255,0.03) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(0,123,255,0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(0,86,179,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
    animation: float 15s ease-in-out infinite;
}

/* 頁面內容淡入動畫 */
main {
    animation: fadeIn 0.6s ease-out;
}

/* Header淡入動畫已在header样式中定义 */

/* 導航鏈接動畫已在nav ul li中定義 */

/* 標題動畫增強 */
.page-content h2::after {
    animation: slideInLeft 1s ease-out;
}

/* 服務卡片動畫 */
.service {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #007bff, #0056b3);
    transition: width 0.3s;
}

.service:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(0,123,255,0.15);
}

.service:hover::before {
    width: 6px;
}

.service h3 i {
    transition: transform 0.3s;
    display: inline-block;
}

.service:hover h3 i {
    transform: rotate(15deg) scale(1.1);
}

/* 聯繫表單動畫 */
.contact-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-item:hover i {
    animation: float 2s ease-in-out infinite;
    transform: scale(1.1);
}

.contact-item i {
    transition: all 0.3s;
}

/* 表單輸入框動畫 */
.form-group input,
.form-group textarea {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group input:focus,
.form-group textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 123, 255, 0.15);
}

/* Logo动画已在上方重新定义 */

/* 頁腳動畫 */
footer {
    transition: all 0.3s;
}

footer:hover {
    background-color: #2a2a2a;
}

/* 移動端菜單動畫增強 */
nav ul.show {
    animation: slideDown 0.3s ease-out;
}

.mobile-menu-toggle span {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle:hover span {
    background-color: #0056b3;
}

/* 遊戲卡片按鈕動畫 */
.game-card .btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card:hover .btn {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,123,255,0.3);
}

/* 特色框標題動畫 */
.feature-box h3 {
    transition: all 0.3s;
}

.feature-box:hover h3 {
    transform: translateX(5px);
    color: #0056b3;
}

/* 遊戲卡片標題動畫 */
.game-card h3 {
    transition: all 0.3s;
}

.game-card:hover h3 {
    transform: scale(1.05);
    color: #0056b3;
}

/* 頁面內容區域動畫 */
.page-content {
    animation: fadeIn 0.8s ease-out;
}

.page-content h2 {
    animation: slideUp 0.6s ease-out 0.2s both;
}

.page-content h3 {
    animation: fadeIn 0.6s ease-out 0.4s both;
}

.page-content p {
    animation: fadeIn 0.6s ease-out 0.6s both;
}

/* 關於我們區域動畫 */
.about-company {
    position: relative;
}

.about-text {
    animation: slideInLeft 0.8s ease-out both;
}

.about-image {
    animation: slideInRight 0.8s ease-out both;
}

/* 表單組動畫 */
.form-group {
    animation: fadeIn 0.6s ease-out both;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

/* 聯繫信息卡片動畫 */
.contact-item {
    animation: scaleIn 0.6s ease-out both;
}

.contact-item:nth-child(1) { animation-delay: 0.1s; }
.contact-item:nth-child(2) { animation-delay: 0.2s; }
.contact-item:nth-child(3) { animation-delay: 0.3s; }

/* 服務卡片動畫 */
.service {
    animation: slideUp 0.6s ease-out both;
}

.service:nth-child(1) { animation-delay: 0.1s; }
.service:nth-child(2) { animation-delay: 0.2s; }
.service:nth-child(3) { animation-delay: 0.3s; }
.service:nth-child(4) { animation-delay: 0.4s; }

/* 滾動條美化（Webkit瀏覽器） */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #007bff, #0056b3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0056b3, #007bff);
}

/* 選擇文本美化 */
::selection {
    background-color: rgba(0,123,255,0.3);
    color: #333;
}

::-moz-selection {
    background-color: rgba(0,123,255,0.3);
    color: #333;
}

/* 桌面端导航确保横向排列 */
@media(min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    nav ul {
        display: flex !important;
        flex-direction: row !important;
        position: static !important;
        width: auto !important;
        background-color: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    nav ul li {
        margin: 0 0 0 30px !important;
    }
    
    nav ul.show {
        display: flex !important;
    }
}

/* 響應式設計 */
/* 平板設備 */
@media(max-width: 768px) {
    header .container {
        flex-direction: row;
        position: relative;
        padding: 15px 0;
        align-items: center;
    }
    
    .logo-text {
        font-size: 22px !important;
    }
    
    .logo-subtitle {
        font-size: 8px !important;
    }
    
    nav ul {
        margin-top: 0;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    /* 平板設備上的移動端菜單 */
    .mobile-menu-toggle {
        display: flex;
        margin-left: 15px;
    }
    
    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        display: none;
        z-index: 1000;
        margin-top: 15px;
    }
    
    nav ul.show {
        display: flex;
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    .hero h2 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .btn-outline {
        margin-left: 0;
        margin-top: 15px;
        display: inline-block;
    }
    
    .features .container {
        flex-direction: column;
    }
    

    
    .feature-box {
        margin: 10px 0;
        min-width: 100%;
    }
    
    .games .game-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .about-company .container {
        flex-direction: column;
    }
    
    .about-text, .about-image {
        min-width: 100%;
        padding: 20px 0;
    }
    
    .contact-info {
        flex-direction: column;
    }
    
    .page-content h2 {
        font-size: 28px;
    }
    
    .page-content h3 {
        font-size: 20px;
    }
    
    .contact-form {
        padding: 20px;
    }
    
    .service {
        padding: 20px;
    }
}

/* 新聞和公司生活響應式 */
@media(max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .life-content {
        flex-direction: column;
    }
    
    .life-text {
        min-width: 100%;
    }
    
    .life-images {
        min-width: 100%;
    }
    
    .life-features {
        flex-direction: column;
        gap: 15px;
    }
    
    .section-header h2 {
        font-size: 32px;
    }
    
    .section-description {
        font-size: 16px;
    }
}

/* 手機設備 */
@media(max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    header .container {
        padding: 15px 0;
        align-items: center;
    }
    
    .logo-text {
        font-size: 20px !important;
    }
    
    .logo-subtitle {
        font-size: 7px !important;
        letter-spacing: 1px !important;
    }
    
    /* 移動端菜單 */
    .mobile-menu-toggle {
        display: flex;
        margin-left: 10px;
    }
    
    nav ul {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        display: none;
        z-index: 1000;
        margin-top: 15px;
    }
    
    nav ul.show {
        display: flex;
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    
    main {
        margin-top: 80px;
    }
    
    .hero {
        height: 70vh;
    }
    
    .hero h2 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn-outline {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .features {
        padding: 50px 0;
    }
    
    .feature-box {
        padding: 25px 20px;
        margin: 10px 0;
        min-width: 100%;
    }
    
    .feature-box i {
        font-size: 36px;
    }
    
    .feature-box h3 {
        font-size: 20px;
    }
    
    .games {
        padding: 50px 0;
    }
    
    .games h2 {
        font-size: 28px;
    }
    
    .game-grid {
        grid-template-columns: 1fr;
    }
    
    .game-card {
        padding: 20px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-card {
        padding: 30px 20px;
    }
    
    .life-features {
        flex-direction: column;
        gap: 15px;
    }
    
    .life-feature {
        width: 100%;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .tagline-main {
        font-size: 28px !important;
    }
    
    .tagline-line {
        font-size: 16px !important;
    }
    
    .page-content {
        padding: 80px 0 50px;
    }
    
    .page-content h2 {
        font-size: 24px;
        margin-bottom: 25px;
    }
    
    .page-content h3 {
        font-size: 18px;
        margin: 20px 0 10px;
    }
    
    .about-company .container {
        flex-direction: column;
    }
    
    .about-text, .about-image {
        min-width: 100%;
        padding: 20px 0;
    }
    
    .service {
        padding: 15px;
        margin-bottom: 25px;
    }
    
    .service h3 {
        font-size: 18px;
    }
    
    .contact-item {
        padding: 20px;
        margin: 10px 0;
    }
    
    .contact-item i {
        font-size: 36px;
    }
    
    .contact-form {
        padding: 15px;
    }
    
    footer {
        padding: 20px 0;
    }
    
    footer p {
        font-size: 14px;
    }
}

/* 大屏幕設備 */
@media(min-width: 1200px) {
    .feature-box {
        min-width: 350px;
    }
}

/* 超大屏幕設備 */
@media(min-width: 1400px) {
    .container {
        max-width: 1300px;
    }
    
    .hero .container {
        max-width: 900px;
    }
    
    .page-content .container {
        max-width: 900px;
    }
}