/* ===============================
   基本設定
=============================== */
body {
    font-family: 'M PLUS Rounded 1c', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #f9fafb;
    color: #333;
}

/* ===============================
   ヘッダー
=============================== */
header {
    background: linear-gradient(135deg, #43cea2, #185a9d);
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 a {
    color: #fff;
    text-decoration: none;
    font-size: 1.6rem;
    font-weight: bold;
}

nav ul {
    list-style: none;
    margin: 0.5rem 0 0 0;
    padding: 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

nav ul li a:hover {
    text-decoration: underline;
}

/* ===============================
   メインコンテンツ
=============================== */
main {
    padding: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* ===============================
   キャッチコピー・サブコピー
=============================== */
.catch-copy {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-top: 20px;
}

.sub-copy {
    text-align: center;
    color: #100f0f;
    margin-bottom: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* ===============================
   CTAボタン
=============================== */
.cta-buttons {
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    flex: 1 1 auto;
    min-width: 140px;
    text-align: center;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(135deg, #43cea2, #185a9d);
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s, transform 0.2s;
}

.btn:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6b7280;
}

.btn-secondary:hover {
    background: #4b5563;
}

/* ===============================
   最近作ったグループ
=============================== */
.recent-groups {
    margin: 20px 0;
    max-height: calc(5 * 60px + 4 * 12px);
    overflow-y: auto;
    padding: 8px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.recent-groups h2 {
    margin-bottom: 12px;
    text-align: center;
}

.recent-groups ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-groups li {
    background-color: #e0f0ff;
    border-radius: 30px;
    padding: 10px 16px;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recent-groups li:hover {
    background-color: #b0d8ff;
}

.recent-groups a {
    text-decoration: none;
    color: #131314;
    font-weight: bold;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-groups .delete-btn {
    border: none;
    background: none;
    cursor: pointer;
    color: red;
    font-size: 1.4em;
    margin-left: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===============================
   モーダル
=============================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.modal-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.modal-buttons button[type="submit"] {
    background-color: #f04f3d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.modal-buttons button[type="submit"]:hover {
    background-color: #d03c2c;
}

.modal-buttons #cancelModal {
    background-color: #ccc;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
}

.modal-buttons #cancelModal:hover {
    background-color: #aaa;
}

/* ===============================
   アプリの使い方
=============================== */
.app-description {
    text-align: center;
    padding: 40px 0;
}

.how-to {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.step {
    flex: 1 1 30%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.step img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    object-position: center;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    background-color: #f2f2f2;
}

.step p {
    margin-top: 12px;
    font-weight: 600;
    color: #333;
    font-size: 1.05rem;
}

/* ===============================
   主な機能
=============================== */
.features {
    text-align: center;
    padding: 40px 20px;
    background-color: #f9fafb;
}

.features h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
}

.features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.features ul li {
    background-color: #fff;
    padding: 15px 20px;
    border-radius: 14px;
    width: 250px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.features ul li:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* ===============================
   スプラッシュ画面
=============================== */
#splash {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #43cea2, #185a9d);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: hidden;
}

#splash-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

#splash-logo {
    position: relative;
    font-size: 3rem;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(90deg, #00ffb3, #00ffa0, #00e6a0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px #00ffb3, 0 0 25px #00ffa0, 0 0 35px #00e6a0;
    animation: floatLogo 2s ease-in-out infinite;
    z-index: 10;
}

.splash-copy {
    font-size: 18px;
    text-align: center;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 5px #00ffb3, 0 0 10px #00ffa0;
    margin-top: 8px;
    z-index: 10;
    opacity: 1;
    animation: fadeInUp 1.5s ease forwards, floatCopy 2s ease-in-out infinite;
    animation-delay: 0.5s;
}

#splash-tasuki {
    position: absolute;
    top: 50%;
    left: -150px;
    width: 150px;
    height: 10px;
    background: #00ffb3;
    border-radius: 5px;
    transform: rotate(-15deg);
    animation: moveTasuki 1.5s linear infinite;
    z-index: 9;
}

/* アニメーション */
@keyframes floatLogo {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

@keyframes floatCopy {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes moveTasuki {
    0% { left: -150px; opacity: 1; }
    80% { left: 100%; opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}



/* ===============================
   レスポンシブ対応
=============================== */
@media (max-width: 768px) {
    .how-to {
        flex-direction: column;
        align-items: center;
        gap: 2.5rem;
        padding: 0 1rem;
    }
    .step {
        flex: none;
        width: 95%;
    }
    .step img {
        aspect-ratio: 4/3;
        width: 100%;
        object-fit: contain;
    }
    .step p {
        font-size: 1.1rem;
        margin-top: 0.8rem;
    }
    .features ul {
        flex-direction: column;
        align-items: center;
    }
    .features ul li {
        width: 90%;
    }
}

@media (min-width: 768px) {
    header h1 a { font-size: 1.6rem; }
    nav ul { margin: 0; }
    section { padding: 2rem; }
    .cta-buttons { justify-content: flex-start; }
    .how-to { flex-direction: row; justify-content: space-between; }
    .step img { max-width: 200px; }
}

@media (min-width: 1024px) {
    body { font-size: 1.1rem; }
    .btn { padding: 1rem 1.5rem; font-size: 1rem; }
    section { padding: 2.5rem; }
}
