/* === 共通スタイル === */
@import url('https://fonts.googleapis.com/css2?family=Kosugi+Maru&display=swap');
* {
    font-family: 'Kosugi Maru', sans-serif;
    color: #111;
    text-align: center;
    line-height: 1.7;
    margin: 0;
    padding: 0;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Noto Sans JP', sans-serif;
    min-height: 100vh;
}

main {
    flex: 1;
    padding-top: 160px;
    padding-bottom: 100px;
}

/*--header--*/
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background-color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1250px;
  margin: 10px auto;
  width: 100%;
  transition: margin 0.3s ease;
}

.shrink .header {
    margin-top: 10px;
    margin-bottom: 2px;
}

.header-logo {
  margin-left: clamp(10px, 10vw, 250px);
}

.logo {
  height: 75px;
  width: auto;
  transition: filter 0.2s ease-in-out, height 0.3s ease;
}

.logo:hover {
  filter: brightness(1.1);
}

.shrink .logo {
  height: 60px;
}

.auth-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-right: clamp(10px, 10vw, 250px);
  white-space: nowrap;
  max-width: 300px;
}

.auth-buttons .button {
  padding: 8px 16px;
  font-size: 18px;
  transition: all 0.3s ease;
}

.shrink .auth-buttons .button {
  font-size: 15px;
  padding: 7px 14px;
}

.auth-buttons .username {
  font-size: 20px;
  font-weight: 700;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  margin-right: 10px;
  transition: font-size 0.3s ease;
}

.shrink .auth-buttons .username {
  font-size: 18px;
}

.button {
  display: block;
  text-align: center;
  text-decoration: none;
  color: white;
  background-color: #007bff;
  border-radius: 5px;
  padding: 8px 16px;
  font-size: 16px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s, transform 0.2s;
}

.button:hover {
  background-color: #005bff;
  transform: scale(1.01);
}

.button.register {
  background-color: #30b14e;
}

.button.register:hover {
  background-color: #00c42b;
  box-shadow: 0px 0px 5px #00c42b;
}


/*--nav--*/
.nav {
    justify-content: center;
    background-color: #007bff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    z-index: 1000;
    display: flex;
    position: sticky;
    top: 0;
}

.nav a {
    flex: 1;
    text-align: center;
    color: white;
    text-decoration: none;
    padding: 10px 0;
    position: relative;
}

.nav a:first-child {
    border-left: 2px solid white;
}

.nav a:last-child {
    border-right: 2px solid white;
}

.nav a:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: white;
}

.nav-container {
    width: 100%;
    max-width: 900px;
    margin: 0 clamp(25px, 5vw, 80px);
    display: flex;
    justify-content: space-around;
}

.nav-container a {
    color: white;
    font-size: 20px;
    text-decoration: none;
    padding: 12px 20px;
    transition: background-color 0.3s, transform 0.2s, padding 0.3s ease, font-size 0.3s ease;
}

.nav-container a:hover {
    background-color: #0056b3;
}

.shrink .nav-container a {
    font-size: 18px;
    padding: 8px 20px;
}

/*--footer--*/
footer {
    background-color: #0056b3;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1324px;
    font-size: 16px;
    padding: 30px 0px;
    margin: 0px auto;
    margin-top: auto;
}

.links {
    margin-left: clamp(10px, 10vw, 250px);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.links a {
    color: #FFFFFF;
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

.links p {
    color: #FFFFFF;
}

.footer-logo {
    margin-right: clamp(10px, 10vw, 250px);
}

.copy {
    color: #FFFFFF;
    padding: 10px;
    font-size: 16px;
}

/* ポップアップ */
.notification {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #007bff;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 16px;
    display: none;
    opacity: 0;
    z-index: 9999;
    transition: opacity 0.3s ease-in-out;
}

/* === メディアクエリ === */

/* タブレット（768px〜1024px） */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    main {
        padding-top: 134px;
        padding-bottom: 80px;
    }

    .shrink .header {
        margin-top: 8px;
        margin-bottom: 2px;
    }

    .logo {
        height: 60px;
    }

    .shrink .logo {
        height: 50px;
    }

    .auth-buttons .button {
        padding: 7px 14px;
        font-size: 16px;
    }

    .shrink .auth-buttons .button {
        font-size: 14px;
    }

    .nav-container a {
        font-size: 16px;
        padding: 10px 16px;
    }

    .shrink .nav-container a {
        font-size: 16px;
        padding: 8px 16px;
    }

    .footer {
        font-size: 12px;
        padding: 20px 0px;
    }
    
    .copy {
        font-size: 12px;
    }
}


/* スマホ（480px〜767px） */
@media screen and (min-width: 480px) and (max-width: 767px) {
    main {
        padding-top: 147px;
        padding-bottom: 60px;
    }

    .header,
    .shrink .header {
        margin: 10px auto;
    }

    .logo,
    .shrink .logo {
        height: 60px;
    }

    .header-logo {
        margin-left: 30px;
    }
    
    .nav-container a,
    .shrink .nav-container a {
        font-size: 16px;
        padding: 10px 16px;
    }

    .auth-buttons {
        flex-direction: column;
        gap: 5px;
        margin-right: 30px;
    }

    .auth-buttons .button,
    .shrink .auth-buttons .button {
        font-size: 15px;
        padding: 6px 12px;
    }

    .auth-buttons .username,
    .shrink .auth-buttons .username  {
        font-size: 16px;
        max-width: 150px;
        margin-right: 0px;
        padding: 8px 5px 2px;
    }

    .footer {
        font-size: 12px;
        display: block;
        padding: 15px 0px;
    }
    
    .links {
        margin-left: 0px;
        align-items: center;
        text-align: center;
    }
    
    .footer-logo {
        margin-top: 25px;
        margin-right: 0px;
    }
    
    .copy {
        font-size: 12px;
    }

    .notification {
        top: 10px;
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* スマホ（〜479px） */
@media screen and (max-width: 479px) {
    main {
        padding-top: 112px;
        padding-bottom: 40px;
    }

    .header,
    .shrink .header {
        margin: 10px auto;
    }

    .logo,
    .shrink .logo {
        height: 45px;
    }

    .header-logo {
        margin-left: 20px;
    }

    .auth-buttons {
        flex-direction: column;
        gap: 2px;
        margin-right: 20px;
    }

    .auth-buttons .button,
    .shrink .auth-buttons .button {
        font-size: 10px;
        padding: 5px 10px;
    }

    .auth-buttons .username,
    .shrink .auth-buttons .username {
        font-size: 12px;
        max-width: 100px;
        margin-right: 0px;
        padding: 3px;
    }

    .nav-container a,
    .shrink .nav-container a {
        font-size: 12px;
        padding: 8px 7px;
    }

    .footer {
        font-size: 10px;
        display: block;
        padding: 15px 0px;
    }
    
    .links {
        margin-left: 0px;
        align-items: center;
        text-align: center;
    }
    
    .footer-logo {
        margin-top: 25px;
        margin-right: 0px;
    }
    
    .copy {
        font-size: 10px;
    }

    .notification {
        top: 8px;
        padding: 6px 8px;
        font-size: 10px;
    }
}
