/* 
網站頁面主設計 
*/
 html {
    background: radial-gradient(black 15%, transparent 0%) 0px 0px,
                radial-gradient(black 15%, transparent 0%) 0px 24px,
                radial-gradient(black 15%, transparent 0%) 24px 0px,
                radial-gradient(black 15%, transparent 0%) 24px 24px,
                radial-gradient(rgba(0, 0, 0, 0.1) 20%, transparent 25%) 6px 6px,
                radial-gradient(rgba(0, 0, 0, 0.1) 20%, transparent 25%) 6px 18px,
                radial-gradient(rgba(0, 0, 0, 0.1) 20%, transparent 25%) 18px 18px,
                radial-gradient(rgba(0, 0, 0, 0.1) 20%, transparent 25%) 18px 6px;
    background-color: #282828;
    background-size: 12px 12px;
    height: 100%;
}
/* 網站頁面主體 */
body {
    position: relative;
    height: 100%;
    margin: 0px;
    font: 12px/18px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-image: radial-gradient(100% 70%, transparent, rgba(255, 255, 255, 0.100));
}

/* 
網站頁面總標題 
*/
@keyframes headerGlow {
    0% { box-shadow: 0 3px rgba(0, 0, 0, 0.8); }
    50% { box-shadow: 0 3px rgba(255, 255, 0, 0.5); }
    100% { box-shadow: 0 3px rgba(0, 0, 0, 0.8); }
}

header {
    position: absolute;
    box-sizing: border-box;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    margin: 0;
    z-index: 1;
    box-shadow: 0 3px rgba(0, 0, 0, 0.8);
    background: rgba(20, 20, 20, 0.8);
    border-left: 10px inset rgb(255, 255, 0);
    transition: all 0.5s;
    animation: headerGlow 20s infinite;
}

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

header h1 {
    display: inline-block;
    margin: 0;
    padding: 10px;
    font-family: Georgia, Times, "Times New Roman", serif;
    color: rgb(255, 250, 186);
    font-size: 20px;
    font-weight: normal;
    text-transform: capitalize;
    animation: titlePulse 3s infinite;
}

header p {
    display: inline-block;
    margin: 0;
    color: #999999;
    font-size: 16px;
    font-style: italic;
    transition: opacity 0.5s;
}

header:hover {
    height: 80px;
}

header:hover #expand {
    opacity: 0;
}

header:hover #select {
    opacity: 1;
}

#select {
    position: relative;
    left: -100px;
    opacity: 0;
    transition: all 0.5s ease;
}

/* 遊戲執行區 */
iframe {
    width: 100%;
    height: 100%;
    border: none;
    margin-bottom: -5px;
}

/* 
手機版樣式 
*/
@media screen and (max-width: 768px) {
    header {
      padding: 10px;
    }
    
    header h1 {
      font-size: 24px;
    }

    #expand, #select {
      font-size: 14px;
    }

    #machine {
      height: calc(100vh - 200px);
    }
    
}

/* 
遊戲列表 
*/
@keyframes navItemSlide {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

#nav {
    list-style: none;
    margin: 5px;
}

#nav li {
    display: inline-block;
}

#nav a {
    position: relative;
    margin: 2px 3px;
    padding: 6px 12px 5px;
    font-family: Georgia, Times, "Times New Roman", serif;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 1px;
    line-height: 18px;
    color: #BBB;
    opacity: 0;
    transition: all 0.5s;
}

header:hover #nav a {
    opacity: 1;
    animation: navItemSlide 0.5s ease-out forwards;
}

@keyframes linkGlow {
    0% { color: #BBB; text-shadow: none; }
    50% { color: white; text-shadow: 0 0 5px rgba(255,255,255,0.5); }
    100% { color: #BBB; text-shadow: none; }
}

#nav a:hover {
    color: white;
    animation: linkGlow 1s infinite;
}

#nav a::after {
    content: "//";
    position: absolute;
    top: 1px;
    right: -8px;
    width: 10px;
    height: 20px;
    font-size: 18px;
    letter-spacing: -4px;
    color: #646464;
}

#nav li:first-child a::before {
    content: "//";
    position: absolute;
    top: 1px;
    left: -8px;
    width: 10px;
    height: 20px;
    font-size: 18px;
    letter-spacing: -4px;
    color: #646464;
}

#nav li a.selected {
    color: white;
    text-shadow: 0 0 8px rgba(255,255,255,0.8);
}

/* 
手機版遊戲列表 
*/
@media screen and (max-width: 768px) {
    #nav {
      flex-direction: column;
      align-items: center;
    }
    
    #nav li {
      margin: 5px 0;
    }
    
    #nav li a {
      padding: 8px 15px;
      font-size: 16px;
    }
  }