/* 基本設定 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500&display=swap');

:root {
    --background-color: #050818;
    --text-color: #e0e0e0;
    --border-color: rgba(255, 255, 255, 0.15);
    --input-bg-color: rgba(255, 255, 255, 0.03);
    --placeholder-color: #6a718e;

    /* 既存 */
    --bright-star: #FFFFF0;
    --font-heading: 'Cormorant Garamond', serif;

    /* ▼ 追加：JSで上書きされるヘッダーの実高さ */
    --header-height: 0px;
}


.logo-image {
    height: 200px; /* ロゴの高さを指定します。お好みのサイズに調整してください */
    width: auto;  /* アスペクト比を保ったまま幅を自動調整 */
}

/* ▼▼▼【追加】ヘッダーのスタイル ▼▼▼ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center; /* 垂直中央揃え */
    z-index: 1000;
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, border-bottom 0.4s ease;
    background: rgba(15, 14, 23, 0);
    backdrop-filter: blur(0px);
    border-bottom: 1px solid rgba(167, 199, 231, 0);
    box-sizing: border-box;
}

.site-header.scrolled {
    background: rgba(15, 14, 23, 0.5);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(167, 199, 231, 0.1);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--bright-star);
    text-decoration: none;
}
/* ▲▲▲【追加】ここまで ▲▲▲ */


/* ▼▼▼【変更】bodyから中央寄せのスタイルを削除 ▼▼▼ */
body {
    margin: 0;
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    overflow-x: hidden;
    /* display: flex, justify-content, align-items, min-height を削除 */
}

/* ▼▼▼【追加】フォームを中央に配置するための新しいラッパークラス ▼▼▼ */
.main-content {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;

    /* ここを差し替え：上だけ header-height 分を足す */
    padding: calc(2rem + var(--header-height)) 2rem 2rem;

    box-sizing: border-box;
}



/* ★★★ 背景用のCanvasスタイル ★★★ */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}


.container {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 550px;
    background: rgba(10, 15, 39, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5em 3em;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header {
    text-align: center;
    margin-bottom: 2em;
}

h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: 500;
    letter-spacing: 2px;
    color: #fff;
}

.form-group {
    margin-bottom: 1.8em;
}

label {
    display: block;
    margin-bottom: 0.6em;
    font-weight: 400;
    color: #b0b8d8;
    font-size: 0.9em;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px 15px;
    background: var(--input-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

input::placeholder {
    color: var(--placeholder-color);
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
    outline: none;
    border-color: #3a7bd5;
    box-shadow: 0 0 8px rgba(58, 123, 213, 0.4);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.button-wrapper {
    margin-top: 2.5em;
    display: flex;
    justify-content: center;
}

.submit-btn {
    background: #585863;
    border: 1px solid #7a7a83;
    border-radius: 50px;
    color: #f0f0f0;
    padding: 12px 40px;
    font-size: 1.1em;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    min-width: 200px;
}

.submit-btn:hover:not(:disabled) {
    background: #6a6a75;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
    background: #50505a;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.submit-btn:disabled {
    background-color: #404047;
    color: #888;
    border-color: #555;
    cursor: not-allowed;
    transform: none;
    text-shadow: none;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3);
}

#form-status {
    margin-top: 1.5em;
    text-align: center;
    font-weight: 500;
    height: 1.2em;
    color: #F44336;
}

.particle {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: star-burst 0.8s ease-out forwards;
    pointer-events: none;
    z-index: 999;
}

@keyframes star-burst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--x), var(--y)) scale(0);
        opacity: 0;
    }
}

/* スマホ用（768px以下）の見切れ/被り対策 */
@media (max-width: 768px) {
  /* ロゴを縮めてヘッダーの高さを抑える */
  .logo-image { height: 64px; }

  /* ヘッダーの上下余白も控えめに */
  .site-header { padding: 0.75rem 5%; }

  /* フォームカードの左右余白を少し広げて読みやすく */
  .container { width: 94%; padding: 1.75em 1.25em; }

  /* 見出しが大きすぎる場合に備えて微調整 */
  h1 { font-size: 2em; }
}
