/* === Font & Reset === */
@font-face {
    font-family: AOTFShinGoProRegular;
    src: url("/font/AOTFShinGoProRegular.otf");
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: AOTFShinGoProRegular;
    background-color: #383C3F;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
    cursor: url('/styles/libs/cursor/wii-pointer-ccw.cur'), auto;
}

/* === Navbar === */
nav {
    background-color: #000;
    color: #fff;
    position: fixed;
    width: 100%;
    opacity: 0.7;
    transition: background-color 0.3s, color 0.3s;
}

nav.navbar-default {
    border-color: #373737;
    background-color: #373737;
    padding-bottom: 2px;
}

.navbar-default .navbar-nav > li > a {
    color: #fff;
}

.navbar-default .navbar-nav > li > a:hover {
    color: #fff;
    border-bottom: 2px solid gray;
}

.navbar-default .navbar-brand {
    color: #fff;
}

/* === Sections === */
#home {
    padding-top: 7em;
    padding-bottom: 7em;
    background-image: url('/img/04.jpg');
    background-size: cover;
    background-position: center;
}

#about {
    border: 10px 0 10px 0 solid #333333;
    padding: 4em 0 2em 0;
    /* background-image: url("https://s27.postimg.org/aojyg3mjn/stardust_2_X.png"); */
    font-size: 18px;
}

#portfolio {
    padding: 4em 0 7em 0;
    /* background-image: url('https://s3.postimg.org/pgomjz0dv/footer_lodyas.png'); */
    background-color: #565E65;
    z-index: 999;
}

#contact {
    padding: 3em 0;
}

footer {
    background-color: #383C3F;
    padding: 2em 5em;
    text-align: center;
}

/* === Lists === */
#home ul {
    padding-top: 1em;
}

#home ul a {
    color: grey;
}

#home ul li a:hover {
    display: inline-block;
    color: #2e9cd6;
    position: relative;
    top: -5px;
}

#home ul li {
    display: inline-block;
    padding: 1em 1.5em;
}

#home ul li:first-child {
    display: inline-block;
    padding: 1em 1.5em 1em 0;
}

.jumbotron {
    margin-bottom: 0em;
}

#about img {
    position: relative;
    bottom: -2em;
}

div.portfolio-entries {
    padding-top: 5em;
}

div.portfolio-entries a:hover {
    position: relative;
    top: -1em;
    opacity: .60;
}

#portfolio div.caption {
    display: block;
    padding: 1.25em 0 .75em 0;
    background-color: #414141;
}

#contact ul li a:hover {
    display: inline-block;
    color: #2e9cd6;
    position: relative;
    top: -5px;
}

#contact ul li {
    display: inline-block;
    padding: 1em 1.5em;
}

#contact ul li:first-child {
    display: inline-block;
    padding: 1em 1.5em 1em 0;
}

#server {
    padding: 100px 0;
    text-align: center;
}

#server div {
    width: 50%;
    display: inline-block;
}

.navbar-brand img {
    position: relative;
    top: -.1em;
    height: 100%;
}

.navbar-brand p {
    display: inline-block;
    position: relative;
    padding-left: 1em;
    padding-left: 20px;
}

.sign-in {
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#fiximage img {
    max-width: 100%;
    height: auto;
    border-radius: 50%;
}

#adddanimation {
    animation-name: boing;
    animation-direction: alternate;
    animation-iteration-count: linear;
    display: inline-block;
    animation-duration: 3s;
}

@keyframes boing{
    100%{
        opacity: 1;
    }

    0%{
        opacity: 0;
    }
}

/* === Popup === */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background-color: #fff;
    color: #000;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    max-width: 80%;
    transition: background-color 0.3s, color 0.3s;
}

.close-popup {
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* === Chatroom & Icons === */
.contact-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    color: #000;
    transition: color 0.3s;
}

.chatroom {
    position: fixed;
    right: 0;
    bottom: 0;
    color: gray;
    padding: 0;
    border: none;
    background: none;
}

/* === Link Icons === */
.links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    margin-top: 20px;
    color: #000;
    transition: color 0.3s;
}

.links a svg {
    fill: currentColor;
    color: CanvasText;
    transition: color 0.3s ease;
}

.links a:hover svg {
    color: #66b2ff;
}

/* === Light Mode Overrides === */
@media (prefers-color-scheme: light) {
    body {
        background-color: #f4f4f4;
        color: #000;
    }

    nav,
    nav.navbar-default {
        background-color: #ffffff;
        color: #000;
        border-color: #ccc;
    }

    .navbar-default .navbar-nav > li > a,
    .navbar-default .navbar-brand {
        color: #000;
    }

    #home,
    #portfolio,
    #server {
        background-color: #e0e0e0;
        color: #000;
    }

    #about, 
    #contact {
        background-color: #f0f0f0;
        color: #000;
    }

    footer {
        background-color: #dcdcdc;
        color: #000;
    }

    .popup-content {
        background-color: #fff;
        color: #000;
    }

    .contact-icons,
    .links,
    .links a svg {
        color: #000;
    }
}

/* === Dark Mode Overrides === */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #1e1e1e;
        color: #fff;
    }

    nav,
    nav.navbar-default {
        background-color: #222;
        color: #fff;
        border-color: #444;
    }

    .navbar-default .navbar-nav > li > a,
    .navbar-default .navbar-brand {
        color: #fff;
    }

    #home,
    #portfolio,
    #server {
        background-color: #2a2a2a;
        color: #fff;
    }

    #about, 
    #contact {
        background-color: #1f1f1f;
        color: #fff;
    }

    footer {
        background-color: #383C3F;
        color: #fff;
    }

    .popup-content {
        background-color: #2b2b2b;
        color: #fff;
    }

    .contact-icons,
    .links,
    .links a svg {
        color: #f0f0f0;
    }
}

/*  Wii button */
.m-button {
  all: unset;
  justify-content: center;
  align-items: center;
  column-gap: .5em;
  position: relative;
  border-radius: 50px;
  padding: 16px 24px;
  background-color: #f0f7fa;
  box-shadow: 
    inset 0 -4px 8px #87bfd8,
    0 4px 6px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  color: #0470e3;
  transition: transform .4s cubic-bezier(.55, 1, .15, 1);
  will-change: transform;

    &:hover {
    box-shadow: 
      inset 0 -4px 12px #87bfd8,
      0 6px 12px rgba(0, 0, 0, 0.25);
    color: #035bb9;
    
    &::after {
      opacity: 1;
      transform: scale(1.04, 1.08);
    }
  }
  
  &:active {
    transform: scale(.92);
    
    &::after {
      opacity: 1;
    }
  }
  
  &::after {
    content: '';
    position: absolute;
    inset: 0;
    border-image-source: url('/styles/libs/mario-button-borders.webp');
    border-image-slice: 50%;
    border-image-width: 40px;
    border-style: solid;
    transform: scale(1.04, 1.08);
    opacity: 0;
    transition-property: opacity;
    transition-duration: .4s;
    transition-timing-function: cubic-bezier(.55, 1, .15, 1);
    will-change: transform;
  }
  
  &:focus-visible::after {
    opacity: 1;
    animation: pulsate 1s infinite;
  }
}

.m-button-image {
  width: 1.75em;
  height: 1.75em;
  object-fit: contain;
}

@keyframes pulsate {
  0% {
    transform: scale(1.04, 1.08);
  }
  50% {
    transform: scale(1.08, 1.12);
  }
  100% {
    transform: scale(1.04, 1.08);
  }
}

/* Button Grid Container */
.button-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Button Row */
.button-row {
    display: flex;
    justify-content: center;
    gap: 25px;
    width: 100%;
    flex-wrap: wrap;
}

/* Button Container */
.m-button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 350px;
    min-width: 250px;
    text-decoration: none;
    flex: 1;
}

