/* ==========================================
   FreeUp iOS - Master Stylesheet
   ========================================== */

:root {
    --bg: #000000;
    --card-bg: rgba(28, 28, 30, 0.7);
    --accent: #30d158;
    --text-main: #ffffff;
    --text-sub: #8e8e93;
    --glass: rgba(255, 255, 255, 0.1);
    
    --font-base: clamp(12px, 1.5vw, 15px);
    --font-h1: clamp(1.8rem, 4vh, 3rem);
    --font-h2: clamp(1.3rem, 3vh, 1.8rem);
    --font-h3: clamp(1.1rem, 2vh, 1.3rem);
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    line-height: 1.5;
    font-size: var(--font-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(20px, 4vh, 60px) 15px;
    position: relative;
}

/* 言語切り替え */
.lang-switcher {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 8px;
    z-index: 100;
}

.lang-btn {
    background: var(--glass);
    border: 1px solid var(--glass);
    color: var(--text-main);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: var(--text-main);
    color: var(--bg);
}

/* ヘッダー */
header {
    text-align: center;
    margin-bottom: clamp(20px, 4vh, 50px);
    margin-top: clamp(10px, 2vh, 20px);
}

.app-icon {
    width: clamp(80px, 12vh, 130px);
    height: clamp(80px, 12vh, 130px);
    background: none;
    border-radius: clamp(20px, 3vh, 32px);
    margin: 0 auto clamp(15px, 2vh, 25px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    position: relative;
    /* overflow: hidden; はバッジが消えるため削除 */
}

/* 画像自体の角丸を保証 */
.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.pro-badge {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background-color: #f59e0b;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.75rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 10;
}

h1 {
    font-size: var(--font-h1);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 clamp(5px, 1vh, 10px);
    line-height: 1.1;
}

.tagline, .welcome {
    font-size: clamp(1rem, 2vh, 1.2rem);
    color: var(--text-sub);
    margin-bottom: clamp(15px, 3vh, 30px);
}

/* ボタン */
.download-btn, .kofi-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 40px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-btn {
    background-color: var(--text-main);
    color: var(--bg);
    padding: clamp(12px, 2vh, 18px) clamp(25px, 4vw, 40px);
    font-size: clamp(1rem, 2vh, 1.2rem);
}

.kofi-btn {
    background-color: #FF5E5B;
    color: #fff;
    padding: clamp(10px, 2vh, 15px) clamp(20px, 3vw, 35px);
    font-size: 1.05rem;
}

.version-info {
    display: inline-block;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-sub);
    cursor: pointer;
    border-bottom: 1px dotted var(--text-sub);
}

/* カード類 */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(12px, 2vh, 24px);
    margin-bottom: clamp(20px, 4vh, 50px);
}

.feature-card, .activation-card, .widget-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: clamp(15px, 3vh, 25px);
    border-radius: 20px;
    border: 1px solid var(--glass);
}

.activation-card, .widget-card {
    text-align: left;
    margin-bottom: clamp(20px, 3vh, 30px);
    position: relative;
    overflow: hidden;
}

.activation-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 5px;
    background: linear-gradient(90deg, #1d4ed8, #30d158);
}

.icon-box, .activation-card h2, .widget-card h3 {
    color: var(--accent);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-card {
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.1), transparent);
    border: 1px solid rgba(48, 209, 88, 0.3);
}

/* リスト表示の修正 */
.step-list {
    margin: 15px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step-list li {
    margin-bottom: 12px;
    padding-left: 35px;
    position: relative;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.4;
    text-align: left;
}

.step-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0; top: 0;
    width: 22px; height: 22px;
    background-color: var(--accent);
    color: #000;
    border-radius: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.btn-widget {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid var(--accent);
    margin-top: 5px;
}

/* その他 */
.kofi-section {
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.2), rgba(48, 209, 88, 0.1));
    padding: clamp(20px, 3vh, 35px);
    border-radius: 24px;
    border: 1px solid rgba(48, 209, 88, 0.3);
    text-align: center;
    margin-bottom: clamp(20px, 4vh, 40px);
}

.specs {
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    padding: clamp(15px, 2vh, 20px);
    border-radius: 16px;
    margin-bottom: clamp(20px, 4vh, 40px);
    border: 1px solid var(--glass);
}

.specs .tested-on { color: var(--text-main); font-weight: bold; }
.specs .devices { color: var(--text-sub); font-size: 0.9rem; font-family: monospace; display: block; }
.specs .warning { margin-top: 10px; color: #ff453a; font-size: 0.9rem; font-weight: bold; }

.support { color: var(--text-sub); font-size: 0.95rem; margin-bottom: 15px; }
.link-text { color: var(--accent); text-decoration: none; font-weight: 600; }

footer {
    text-align: center;
    color: #444;
    font-size: 0.8rem;
    border-top: 1px solid var(--glass);
    padding-top: 15px;
    margin-top: auto;
}

/* モーダル */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: #1c1c1e; padding: 25px; border-radius: 24px;
    width: 90%; max-width: 450px; border: 1px solid var(--glass);
    max-height: 80vh; display: flex; flex-direction: column;
}
