/* ===== 共通 ===== */

*,
*::before,
*::after{
    box-sizing:border-box;
}

body{
    margin:0;
}

button{
    cursor:pointer;
}

img{
    display:block;
    max-width:100%;
}

video{
    display:block;
}

/* ===== genarate.html ===== */

body.index-page{
    margin:0;
    padding:0;
    font-family:"Segoe UI",system-ui,sans-serif;
    background:linear-gradient(to right,#e0f2ff,#fde7ef);
    color:#333;
    text-align:center;
}

.index-page .container{
    padding:40px 20px;
    max-width:400px;
    margin:auto;
}

.index-page h1{
    font-size:28px;
    color:#0066ff;
    margin-bottom:10px;
}

.index-page .desc{
    color:#555;
    font-size:15px;
    margin-bottom:30px;
}

.index-page input{
    width:100%;
    padding:10px;
    border:none;
    border-radius:8px;
    font-size:1rem;
    margin-bottom:15px;
    box-shadow:0 2px 5px rgba(0,0,0,.1);
}

.index-page .btn{
    display:block;
    width:100%;
    background:#0d6efd;
    color:#fff;
    border:none;
    border-radius:8px;
    padding:10px;
    margin-bottom:15px;
    font-size:1rem;
}

.index-page .btn-ranking{
    background:#f59e0b;
}

.index-page .preview-box{
    width:100%;
    height:160px;
    background:#fff;
    border-radius:16px;
    margin-top:20px;
    overflow:hidden;
}

.index-page video{
    width:100%;
    height:100%;
    object-fit:cover;
}

.index-page small{
    display:block;
    margin-top:20px;
    color:#777;
    font-size:12px;
}

.index-page #status{
    margin-top:10px;
    font-size:14px;
}

.index-page #charCount{
    text-align:right;
    font-size:12px;
    color:#999;
    margin-top:-10px;
    margin-bottom:10px;
}

.index-page #errorDetail{
    color:red;
    font-size:12px;
    margin-top:5px;
    word-break:break-all;
}

/* 
result
 */
.loading-circle {
  width: 70px;
  height: 70px;
  margin: 30px auto;
  border: 7px solid #ddd;
  border-top: 7px solid #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-box {
  width: 100%;
  height: 12px;
  background: #e5e5e5;
  border-radius: 20px;
  overflow: hidden;
  margin: 20px 0 10px;
}

#progressBar {
  width: 0%;
  height: 100%;
  background: #333;
  transition: width 0.3s ease;
}

#progressText {
  font-size: 18px;
  font-weight: bold;
}

.score {
  margin: 25px 0;
  font-size: 70px;
  font-weight: bold;
}

.scoreUnit {
  font-size: 25px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  margin: 10px 0;
  background: #f5f5f5;
  border-radius: 10px;
}

.result-item strong {
  font-size: 22px;
}

.result-type {
  margin: 20px 0;
  padding: 20px;
  background: #f5f5f5;
  border-radius: 15px;
}

.result-type h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.result-type p {
  margin: 0;
  line-height: 1.7;
  font-size: 15px;
}


/* ===== index.html ===== */

body.generate-page {
    min-height: 100vh;
    margin: 0;
    padding: 50px 20px;

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    text-align: center;
    color: #1e293b;

    background:
        radial-gradient(
            circle at top left,
            rgba(59, 130, 246, 0.15),
            transparent 35%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(139, 92, 246, 0.12),
            transparent 35%
        ),
        #f8fafc;
}


/* ===== タイトル ===== */

.generate-page h1 {
    margin: 10px 0 14px;

    font-size: clamp(28px, 6vw, 38px);
    font-weight: 800;
    letter-spacing: -0.03em;

    background: linear-gradient(
        135deg,
        #2563eb,
        #7c3aed
    );

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}


/* ===== 説明文 ===== */

.generate-page > p {
    max-width: 650px;
    margin: 0 auto 35px;

    color: #64748b;
    font-size: 15px;
    line-height: 1.8;
}


/* ===== 使い方タイトル ===== */

.generate-page h2 {
    margin: 0 auto 15px;

    color: #334155;
    font-size: 21px;
    font-weight: 700;
}


/* ===== 使い方説明 ===== */

.generate-page h2 + p {
    width: min(100%, 650px);

    margin: 0 auto 30px;
    padding: 20px 24px;

    border: 1px solid #e2e8f0;
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.85);

    color: #475569;
    font-size: 14px;
    line-height: 2;

    text-align: left;

    box-shadow:
        0 8px 25px rgba(15, 23, 42, 0.06);
}


/* ===== リンク生成ボタン ===== */

.generate-page > #generateBtn {
    min-width: 230px;

    padding: 14px 26px;
    margin: 5px 0 20px;

    border: none;
    border-radius: 12px;

    background: linear-gradient(
        135deg,
        #2563eb,
        #4f46e5
    );

    color: #fff;

    font-size: 16px;
    font-weight: 700;

    box-shadow:
        0 8px 20px rgba(37, 99, 235, 0.25);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.generate-page > #generateBtn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 28px rgba(37, 99, 235, 0.3);

    filter: brightness(1.05);
}

.generate-page > #generateBtn:active {
    transform: translateY(0);
}


/* ===== URL結果ボックス ===== */

.generate-page .url-box {
    width: min(100%, 620px);

    margin: 25px auto;
    padding: 26px;

    border: 1px solid #e2e8f0;
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.95);

    box-shadow:
        0 12px 35px rgba(15, 23, 42, 0.08);

    word-break: break-all;
}


/* ===== URLラベル ===== */

.generate-page .label {
    display: inline-block;

    margin-bottom: 8px;

    color: #334155;

    font-size: 14px;
    font-weight: 700;
}


/* ===== URL ===== */

.generate-page .url-box a {
    display: block;

    padding: 12px 14px;

    border: 1px solid #e2e8f0;
    border-radius: 10px;

    background: #f8fafc;

    color: #2563eb;

    font-size: 14px;
    line-height: 1.5;

    text-decoration: none;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.generate-page .url-box a:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}


/* ===== 区切り線 ===== */

.generate-page .url-box hr {
    margin: 25px 0;

    border: none;
    border-top: 1px solid #e2e8f0;
}


/* ===== コピー関連ボタン ===== */

.generate-page .copy-btn {
    padding: 9px 16px;
    margin: 10px 0 0;

    border: none;
    border-radius: 9px;

    background: #10b981;

    color: #fff;

    font-size: 13px;
    font-weight: 700;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.generate-page .copy-btn:hover {
    transform: translateY(-1px);
    background: #059669;
}

.generate-page .copied {
    background: #16a34a !important;
}


/* ===== スマホ対応 ===== */

@media (max-width: 600px) {

    body.generate-page {
        padding: 35px 15px;
    }

    .generate-page h1 {
        font-size: 28px;
    }

    .generate-page h2 {
        font-size: 19px;
    }

    .generate-page h2 + p {
        padding: 16px 18px;

        font-size: 13px;
        line-height: 1.9;
    }

    .generate-page > #generateBtn {
        width: 100%;
        min-width: 0;

        padding: 14px 20px;
    }

    .generate-page .url-box {
        padding: 18px;
        border-radius: 15px;
    }

    .generate-page .url-box a {
        font-size: 13px;
    }
}


/* ===== SNS / LINE ===== */

.generate-page .promo-links {
    width: min(100%, 500px);

    margin: 35px auto 10px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

.generate-page .promo-link {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #64748b;
    text-decoration: none;

    transition:
        color .2s ease,
        transform .2s ease;
}

.generate-page .promo-link:hover {
    color: #2563eb;
    transform: translateY(-1px);
}

.generate-page .promo-link-icon {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f1f5f9;

    color: #334155;

    font-size: 13px;
    font-weight: 700;
}

.generate-page .promo-link strong {
    display: block;

    font-size: 13px;
    font-weight: 700;

    text-align: left;
}

.generate-page .promo-link small {
    display: block;

    margin-top: 1px;

    color: #94a3b8;

    font-size: 10px;

    text-align: left;
}

.generate-page .promo-divider {
    width: 1px;
    height: 30px;

    background: #e2e8f0;
}


@media (max-width: 600px) {

    .generate-page .promo-links {
        gap: 16px;
    }

    .generate-page .promo-link-icon {
        width: 32px;
        height: 32px;
    }

    .generate-page .promo-link strong {
        font-size: 12px;
    }

    .generate-page .promo-link small {
        font-size: 9px;
    }
}

/* ===== check.html ===== */

body.check-page{
    background:#111;
    color:#fff;
    text-align:center;
    padding:40px;
    font-family:system-ui;
}

.check-page img{
    width:90%;
    max-width:400px;
    border:2px solid orange;
    border-radius:10px;
    margin-top:20px;
}

.check-page .login-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.9);
    display:flex;
    justify-content:center;
    align-items:center;
    z-index:999;
}

.check-page .login-box{
    background:#1e1e1e;
    padding:30px;
    border-radius:12px;
    text-align:center;
    width:280px;
    color:#fff;
}

.check-page .login-box input{
    width:100%;
    padding:10px;
    margin:8px 0;
    border-radius:6px;
    border:1px solid #444;
    background:#2a2a2a;
    color:#fff;
    font-size:1.2rem;
    text-align:center;
}

.check-page .login-box button{
    width:100%;
    padding:10px;
    background:#3b82f6;
    color:#fff;
    border:none;
    border-radius:6px;
    font-size:1rem;
    margin-top:10px;
}

.check-page .login-error{
    color:#ef4444;
    font-size:13px;
    margin-top:8px;
}

.mt-10{margin-top:10px;}
.mt-20{margin-top:20px;}
.mb-10{margin-bottom:10px;}
.mb-20{margin-bottom:20px;}


/* check.html list */
    #result { width: min(1100px, 94%); margin: 24px auto; }
    .photo-list { display: grid; gap: 16px; }
    .photo-item { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px solid #ddd; border-radius: 12px; background: #fff; }
    .photo-item img { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; flex: 0 0 120px; }
    .photo-info { text-align: left; color: #222; }
    .photo-name { color: #222; font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
    .photo-time { color: #666; font-size: .9rem; }
    .empty { text-align: center; padding: 30px; color: #666; }
    @media (max-width: 600px) {
      .photo-item { align-items: flex-start; }
      .photo-item img { width: 90px; height: 90px; flex-basis: 90px; }
    }

