
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #7ca1b8;
    text-align: center;
}
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #7ca1b8;
    color: #ffffff;
    padding: 10px 20px;
}
#title{  
    width:250px;
    a{  
        text-decoration: none; 
        color: #000000;
}
}
#title a:hover{
    color: #000000;
}
/*導覽區*/
nav {
    display: flex;
    gap: 15px;
}
nav a {
    margin:5px;
    color: #ffffff;
    text-decoration: none;       
}
/*超連結文字效果*/
header a:hover{
    color: #000000;
	
}
/* 響應式導覽列 - 小螢幕改為漢堡選單 */
.menu-toggle {
    display: none;
    font-size: 30px;
    cursor: pointer;
    color: white;
}
/*主要區域*/
.center{
    background-color: #7ca1b8;
    height: 100%;
    display: flex;
    justify-content: center;
}
.section_Index{
    display: flex;
    flex-wrap: wrap;
    background: #ffffff;
    padding: 20px;
    border-radius: 5px;
    width: 90%;
    max-width: 900px;
    animation: fade 1s linear 0s infinite;
    animation-iteration-count:1;
    animation-fill-mode:forwards;
    align-items: center;
}
@keyframes fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
/*側邊頭像*/
aside{
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: leftIn 1s linear 0s infinite;
    animation-iteration-count:1;
    animation-fill-mode:forwards;
}
@keyframes leftIn {
    from {
        transform: translate3d(-20%, 0, 0);
    }
    to {
        transform: none;
    }
}
/*照片*/
.placehoider{
    padding: 0px;
    width: 80%;
    max-width: 200px;
    border: #000000;
    border-radius: 99em;
    border-style: solid;
    float: right;
}
/*文字內容*/
article{
    flex: 2;
    width: 90%;
    float: left;
    font-family: Arial, Helvetica, sans-serif;
    color:#000000;
    padding: 15px;
    height: auto; 
}
article h2{
    font-size: 36px;
    animation: bottomIn 2s linear 0s infinite;
    animation-iteration-count:1;
    animation-fill-mode:forwards;
}
article p{
    animation: bottomIn 2s linear 0s infinite;
    animation-iteration-count:1;
    animation-fill-mode:forwards;
}
@keyframes bottomIn {
    from {
        transform: translate3d(0,50%, 0);
    }
    to {
        transform: none;
    }
}
.btn{
    align-self: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    justify-content:center;
}
.btn button{   
    width: 100px;
    height: auto;
    background-color:  #3c93e4;
    border-radius: 99em;
    border-style:none;
    color:white;
    font-size: 24px;
    font-family: fantasy;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);    
    animation:slideUp 4s linear 0s infinite;
    animation-iteration-count:1;
    animation-fill-mode:forwards;
    opacity: 0;
}
.btn button:hover {
    background-color: #1e70c1;
}
article button:nth-child(1){
animation-delay: 1s;
}
article button:nth-child(2){
animation-delay: 1.5s;
}
article button:nth-child(3){
    animation-delay: 2s;
}
article button:nth-child(4){
    animation-delay: 2.5s;
}
/*按鈕逐漸浮現*/
@keyframes slideUp {
    0% { transform: translateY(100%); opacity: 0; }
    20% { transform: translateY(0); opacity: 1; }
    40% { transform: translateY(0); opacity: 1; }
    60% { transform: translateY(0); opacity:1; }
    100% { transform: translateY(0); opacity:1; }
  }
hr{
    border: 0;
    padding-top: 10px;
    color: #d0d0d5;
    border-top: 1px solid rgba(0,0,0,.1);
    box-shadow: inset 0 10px 10px -10px;
}
/*頁尾*/
footer {
    
    clear: left;
    text-align: center;
    padding: 10px 0;
    background: #7ca1b8;
    color: #ffffff;
    position: relative;
    width: 100%;
    
}
.footer-contact{
    float: left;
    width: 25%;
    height: 80px;
    line-height:5px;
    a{
    text-decoration: none;
    color: #fff;
    align-content: center;
    
    }
    p{
        line-height: 80px;
    }
}
.footer-menu{
    list-style: none;
    align-content: center;  
    padding-right:20px;  
    li{
      display: inline-block;
      margin-right:20px ;
    }
}
.footer-menu img{
    height: 30px;
    width: 30px;
}
/* 響應式設計 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }
    nav {
        display: none;
        flex-direction: column;
        gap: 10px;
    }
    .menu-toggle {
        display: block;
    }
    section {
        flex-direction: column;
        align-items: center;
    }
    .placehoider {
        width: 200px;
    }

    .btn {
        flex-direction: column;
        align-items: center;
    }

    .btn button {
        width: 100%;
    }

    .footer-contact {
        width: 100%;
    }
}
.article_contact{
    flex: 2;
    align-self: start;
    display: table-cell;
    vertical-align: middle;
}
.article_contact a{
    color: #000;
    text-decoration: none; 
}

.aside_contact{
    flex: 2;
    align-items:center;
}

.contact-form {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}
.contact-form h2 {
    margin-bottom: 15px;
    text-align: center;
}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.contact-form button {
    width: 100%;
    padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.contact-form button:hover {
    background: #0056b3;
}
.container{
width: 80%;
           max-width: 1200px;
           margin: auto;
           padding: 20px;
           background: #7ca1b8;
}
.title_about{
    text-align: left;
    font-size: 24px;
    font-weight: bold;
    padding: 20px 0;
}
.section_about{
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #ccc;
    padding: 20px 0;
}
.section_about li{
    text-align: left;
}
.section_about h2{
    flex: 3;
    font-size: 20px;
    text-align: center;
}
.content {
    flex: 2;
    
}
canvas{
    box-shadow: black 10px 10px 50px;
    
}
#Topbtn {
    display: none;
    position: fixed;
    bottom: 10px;
    right: 20px;
    z-index: 99;
    border: none;
    
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    outline: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 99px;
    cursor: pointer;
    font-weight: bold;
  }
  
#Topbtn:hover {
    background-color: #0056b3;
 }
.center_game{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}
.game-links-container {
    display: flex;
    gap: 15px;
    justify-content: center;
}
.game-section {
    margin: 20px auto;
    align-self: center;
    width: 450px;
    background: linear-gradient(135deg,#00BFFF, #8A2BE2);
    background-size: 200% 200%;
    animation: gradient 6s ease infinite;
}
@keyframes gradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}
   

/* 輸入框 */
#guessnum {
    width: 200px;
    padding: 10px;
    font-size: 18px;
    text-align: center;
    border: 2px solid #FFD700;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s ease;
}

#guessnum:focus {
    border-color: #ff3d68;
    box-shadow: 0 0 8px rgba(255, 61, 104, 0.5);
}

/* 按鈕美化 */
.game-section button {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}
#ansbtn:hover{
    background-color:#FFD700;
    box-shadow: 0 4px 10px #917c09;
}
.flex-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
/*作品集*/
.portfolio {
    
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size:20px;
}

.portfolio-item {
    width: 200px;
    cursor: pointer;
    border: 1px solid #ddd;
    padding: 10px;
    transition: 0.3s;
    background-color: #427cb9;
}

.portfolio-item:hover {
    transform: scale(1.05);
    background-color: #3c93e4;
}

.portfolio-item img {
    width: 100%;
    max-height: 150px;
}

/* Modal 設計 */
.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    
    
}

.modal-content {
    background-color: white;
    padding: 20px;
    max-width: 90%;
    text-align: center;
    position: relative;
    border-radius: 10px;
    max-height: 90%;
    overflow-y:auto;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
    color: #333;
}

/* 主圖片 */
#main-image {
    width: 80%;
    max-width: 600px;
    margin-bottom: 10px;
    max-height: 480px;
    border:0.5px solid hsla(0, 0%, 69%, 0.39) ;
    box-shadow: 5px 5px 5px gray;
    max-height: 480px;
}

/* 縮圖區域 */
.thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    
}

.thumbnails img {
    width: 80px;
    cursor: pointer;
    transition: 0.3s;
    border-radius: 5px;
    border:0.5px solid #000 ;
}

.thumbnails img:hover {
    transform: scale(1.1);
    border: 2px solid #007bff;
}
 /*porfolio響應式設計*/
 @media (max-width: 768px) {
    .modal-content {
        width: 95%;
    }
    #main-image {
        width: 100%;
    }
    .thumbnails img {
        width: 60px;
    }
}