/* 全局樣式 */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --light-bg: #f5f6fa;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

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

/* 導航欄樣式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

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

.menu-btn {
    display: none;
    cursor: pointer;
}

/* 英雄區域樣式 */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    text-align: center;
    padding-top: 80px;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

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

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 關於我區域樣式 */
.about {
    padding: 100px 0;
    background: var(--white);
}

.about h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.about-content {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.about-text {
    flex: 1;
}

.skills {
    margin-top: 2rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.skill-tags span {
    background: var(--light-bg);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

/* 專案區域樣式 */
.projects {
    padding: 100px 0;
    background: var(--light-bg);
}

.projects h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

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

.project-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

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

.project-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.project-card p {
    margin-bottom: 1.5rem;
}

/* 聯絡方式區域樣式 */
.contact {
    padding: 100px 0;
    background: var(--white);
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
}

/* 頁尾樣式 */
footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 1rem 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-btn {
        display: block;
        font-size: 1.5rem;
        color: var(--primary-color);
        cursor: pointer;
    }

    .menu-btn.active i {
        color: var(--secondary-color);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .about-content {
        flex-direction: column;
    }
}

/* 動畫效果 */
[data-aos] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* 所有專案區域樣式 */
.all-projects {
    padding: 100px 0;
    background: var(--white);
}

.all-projects h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

.project-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.project-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-item h4 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.project-item p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.project-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* 更新專案卡片樣式 */
.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.project-card .project-links {
    margin-top: auto;
    padding-top: 1rem;
}

/* 響應式設計更新 */
@media (max-width: 768px) {
    .project-categories {
        grid-template-columns: 1fr;
    }
    
    .category {
        padding: 1.5rem;
    }
    
    .project-item {
        padding: 1rem;
    }
}

/* 社交媒體卡片樣式 */
.social-media {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.main {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.up {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
}

.down {
    display: flex;
    flex-direction: row;
    gap: 0.5em;
}

.card1, .card2, .card3, .card4 {
    width: 90px;
    height: 90px;
    outline: none;
    border: none;
    background: white;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    transition: .2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card1 {
    border-radius: 90px 5px 5px 5px;
}

.card2 {
    border-radius: 5px 90px 5px 5px;
}

.card3 {
    border-radius: 5px 5px 5px 90px;
}

.card4 {
    border-radius: 5px 5px 90px 5px;
}

.instagram, .twitter, .github, .discord {
    width: 24px;
    height: 24px;
}

.instagram {
    fill: #cc39a4;
}

.twitter {
    fill: #03A9F4;
}

.github {
    fill: #333;
}

.discord {
    fill: #8c9eff;
}

/* 移除舊的邊距設定 */
.instagram, .twitter, .github, .discord {
    margin: 0;
}

.card1:hover {
    cursor: pointer;
    scale: 1.1;
    background-color: #cc39a4;
}

.card1:hover .instagram {
    fill: white;
}

.card2:hover {
    cursor: pointer;
    scale: 1.1;
    background-color: #03A9F4;
}

.card2:hover .twitter {
    fill: white;
}

.card3:hover {
    cursor: pointer;
    scale: 1.1;
    background-color: black;
}

.card3:hover .github {
    fill: white;
}

.card4:hover {
    cursor: pointer;
    scale: 1.1;
    background-color: #8c9eff;
}

.card4:hover .discord {
    fill: white;
}

/* 響應式設計更新 */
@media (max-width: 768px) {
    .social-media {
        margin-top: 2rem;
    }
    
    .card1, .card2, .card3, .card4 {
        width: 70px;
        height: 70px;
    }
    
    .instagram, .twitter, .github, .discord {
        width: 20px;
        height: 20px;
    }
}

/* 翻轉卡片樣式 */
.flip-card {
  background-color: transparent;
  width: 190px;
  height: 254px;
  perspective: 1000px;
  font-family: sans-serif;
  margin: 2rem auto;
}

.title {
  font-size: 1.5em;
  font-weight: 900;
  text-align: center;
  margin: 0;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  box-shadow: 0 8px 14px 0 rgba(74, 144, 226, 0.2);
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border: 1px solid var(--primary-color);
  border-radius: 1rem;
}

.flip-card-front {
  background: linear-gradient(120deg, 
    rgba(245, 247, 250, 1) 60%, 
    rgba(195, 207, 226, 0.8) 88%,
    rgba(74, 144, 226, 0.1) 40%, 
    rgba(74, 144, 226, 0.2) 48%);
  color: var(--primary-color);
}

.flip-card-back {
  background: linear-gradient(120deg, 
    rgba(74, 144, 226, 0.9) 30%, 
    rgba(74, 144, 226, 1) 88%,
    rgba(44, 62, 80, 0.8) 40%, 
    rgba(74, 144, 226, 0.8) 78%);
  color: white;
  transform: rotateY(180deg);
}

.future-note {
  position: absolute;
  bottom: 20px;
  left: 20px;
  font-size: 0.9em;
  font-style: italic;
  color: var(--primary-color);
}

.future-subtitle {
  margin-top: 1rem;
  font-size: 1.1em;
  color: white;
} 