* { margin:0; padding:0; box-sizing:border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh; display:flex; align-items:center; justify-content:center;
    padding:20px; background:linear-gradient(135deg,#0f0f1a 0%,#1a1a2e 100%);
    transition:background 0.6s ease; color:#e5e7eb;
}
body.ios.mode-price      { background:linear-gradient(135deg,#1e1e2e 0%,#2a2d47 100%); }
body.ios.mode-uc         { background:linear-gradient(135deg,#0f2027 0%,#1a3a2a 100%); }
body.android.mode-price  { background:linear-gradient(135deg,#0a1a10 0%,#0f2918 100%); }
body.android.mode-uc     { background:linear-gradient(135deg,#1a0f1a 0%,#2d1030 100%); }
body.midasbuy.mode-price { background:linear-gradient(135deg,#1a1400 0%,#2a2000 100%); }
body.midasbuy.mode-uc    { background:linear-gradient(135deg,#1a1000 0%,#2d1a00 100%); }

.page { width:100%; max-width:500px; }
.page.hidden { display:none !important; }
@keyframes slideUp   { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }
@keyframes slideDown { from{opacity:0;transform:translateY(-24px)} to{opacity:1;transform:translateY(0)} }
.anim-up   { animation:slideUp   0.42s cubic-bezier(0.22,1,0.36,1) both; }
.anim-down { animation:slideDown 0.42s cubic-bezier(0.22,1,0.36,1) both; }

/* 웰컴 */
#welcomePage { text-align:center; }
.welcome-logo {
    font-size:2.8rem; font-weight:800; letter-spacing:-1px;
    background:linear-gradient(45deg,#60a5fa,#a78bfa,#f472b6);
    -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent;
    margin-bottom:8px;
}
.welcome-sub      { font-size:0.88rem; color:#4b5563; margin-bottom:42px; }
.welcome-question { font-size:1rem; font-weight:600; color:#9ca3af; margin-bottom:20px; }
.os-cards { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.os-card {
    flex:1; min-width:120px; max-width:160px; padding:28px 16px 22px;
    border-radius:22px; cursor:pointer;
    border:1.5px solid rgba(255,255,255,0.06);
    background:rgba(255,255,255,0.03);
    transition:all 0.32s cubic-bezier(0.34,1.56,0.64,1);
    position:relative; overflow:hidden;
}
.os-card::before {
    content:''; position:absolute; inset:0; opacity:0;
    transition:opacity 0.3s; border-radius:20px;
}
.ios-card::before    { background:linear-gradient(135deg,rgba(59,130,246,0.1),rgba(99,102,241,0.1)); }
.aos-card::before    { background:linear-gradient(135deg,rgba(61,186,116,0.1),rgba(52,168,83,0.1)); }
.midas-card::before  { background:linear-gradient(135deg,rgba(251,191,36,0.12),rgba(245,158,11,0.1)); }
.os-card:hover::before  { opacity:1; }
.os-card:hover          { transform:translateY(-6px); }
.ios-card:hover   { border-color:rgba(99,102,241,0.45);  box-shadow:0 14px 36px rgba(99,102,241,0.18); }
.aos-card:hover   { border-color:rgba(52,168,83,0.45);   box-shadow:0 14px 36px rgba(52,168,83,0.18); }
.midas-card:hover { border-color:rgba(251,191,36,0.5);   box-shadow:0 14px 36px rgba(251,191,36,0.2); }
.os-icon { width:52px; height:52px; margin:0 auto 16px; display:flex; align-items:center; justify-content:center; }
.os-icon svg { width:60px; height:60px; transition:transform 0.3s ease; }
.os-card:hover .os-icon svg { transform:scale(1.1); }
.os-name { font-size:1rem; font-weight:700; margin-bottom:5px; }
.ios-card   .os-name { color:#93c5fd; }
.aos-card   .os-name { color:#6ee7b7; }
.midas-card .os-name { color:#fbbf24; }
.os-desc { font-size:0.73rem; color:#4b5563; line-height:1.6; }

/* 계산기 */
.back-btn {
    display:inline-flex; align-items:center; gap:6px;
    font-size:0.82rem; font-weight:600; color:rgba(255,255,255,0.32);
    cursor:pointer; border:none; background:transparent; padding:4px 0 18px;
    transition:color 0.2s; width:auto;
}
.back-btn:hover { color:rgba(255,255,255,0.65); transform:none; box-shadow:none; }
.back-btn svg { width:14px; height:14px; }

.title { text-align:center; margin-bottom:22px; font-size:1.85rem; font-weight:700; transition:all 0.4s; line-height:1.2; }
body.ios.mode-price      .title { background:linear-gradient(45deg,#60a5fa,#a78bfa); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
body.ios.mode-uc         .title { background:linear-gradient(45deg,#34d399,#059669); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
body.android.mode-price  .title { background:linear-gradient(45deg,#6ee7b7,#3dba74); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
body.android.mode-uc     .title { background:linear-gradient(45deg,#f472b6,#db2777); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
body.midasbuy.mode-price .title { background:linear-gradient(45deg,#fbbf24,#f59e0b); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }
body.midasbuy.mode-uc    .title { background:linear-gradient(45deg,#fcd34d,#d97706); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; }

.title-badge {
    display:inline-block; font-size:0.66rem; font-weight:800;
    padding:3px 9px; border-radius:20px; margin-left:8px; vertical-align:middle;
    background:rgba(251,191,36,0.13); color:#fbbf24;
    border:1px solid rgba(251,191,36,0.35); -webkit-text-fill-color:#fbbf24;
    position:relative; top:-4px;
    animation:badgePulse 2.5s ease-in-out infinite;
}
@keyframes badgePulse {
    0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(251,191,36,0)}
    50%{opacity:.8;box-shadow:0 0 8px 2px rgba(251,191,36,0.2)}
}

.calculator { backdrop-filter:blur(20px); border-radius:20px; padding:28px; transition:all 0.5s; }
body.ios.mode-price      .calculator { background:rgba(41,41,61,0.85);  border:1px solid rgba(255,255,255,0.1); }
body.ios.mode-uc         .calculator { background:rgba(15,40,30,0.85);  border:1px solid rgba(52,211,153,0.15); }
body.android.mode-price  .calculator { background:rgba(10,30,18,0.85);  border:1px solid rgba(61,186,116,0.15); }
body.android.mode-uc     .calculator { background:rgba(35,10,35,0.85);  border:1px solid rgba(244,114,182,0.15); }
body.midasbuy.mode-price .calculator { background:rgba(30,22,0,0.88);   border:1px solid rgba(251,191,36,0.18); }
body.midasbuy.mode-uc    .calculator { background:rgba(30,18,0,0.88);   border:1px solid rgba(245,158,11,0.18); }

.input-group { margin-bottom:18px; }
label { display:block; margin-bottom:8px; font-weight:600; color:#d1d5db; font-size:0.93rem; }
input[type="number"] {
    width:100%; padding:14px; font-size:1.1rem; border-radius:12px;
    background:rgba(31,41,55,0.8); color:#fff; text-align:center; outline:none; transition:border-color 0.3s;
}
body.ios.mode-price      input[type="number"] { border:2px solid rgba(75,85,99,0.5); }
body.ios.mode-price      input[type="number"]:focus { border-color:#60a5fa; }
body.ios.mode-uc         input[type="number"] { border:2px solid rgba(52,211,153,0.3); }
body.ios.mode-uc         input[type="number"]:focus { border-color:#34d399; }
body.android.mode-price  input[type="number"] { border:2px solid rgba(61,186,116,0.3); }
body.android.mode-price  input[type="number"]:focus { border-color:#3dba74; }
body.android.mode-uc     input[type="number"] { border:2px solid rgba(244,114,182,0.3); }
body.android.mode-uc     input[type="number"]:focus { border-color:#f472b6; }
body.midasbuy.mode-price input[type="number"] { border:2px solid rgba(251,191,36,0.35); }
body.midasbuy.mode-price input[type="number"]:focus { border-color:#fbbf24; }
body.midasbuy.mode-uc    input[type="number"] { border:2px solid rgba(245,158,11,0.35); }
body.midasbuy.mode-uc    input[type="number"]:focus { border-color:#f59e0b; }

.checkbox-group { display:flex; align-items:center; margin-bottom:20px; padding-left:5px; cursor:pointer; }
.checkbox-group input[type="checkbox"] {
    appearance:none; width:20px; height:20px; border-radius:6px;
    margin-right:12px; cursor:pointer; position:relative; transition:all 0.3s; flex-shrink:0;
}
body.ios.mode-price     .checkbox-group input[type="checkbox"] { border:2px solid #60a5fa; }
body.ios.mode-price     .checkbox-group input[type="checkbox"]:checked { background:#60a5fa; border-color:#60a5fa; }
body.ios.mode-uc        .checkbox-group input[type="checkbox"] { border:2px solid #34d399; }
body.ios.mode-uc        .checkbox-group input[type="checkbox"]:checked { background:#34d399; border-color:#34d399; }
.checkbox-group input[type="checkbox"]:checked::after {
    content:'✓'; position:absolute; color:white; font-size:13px; font-weight:bold;
    left:50%; top:50%; transform:translate(-50%,-50%);
}
.checkbox-group label { font-size:0.93rem; color:#cbd5e1; cursor:pointer; }

button.calc-btn {
    width:100%; padding:14px; font-size:1.05rem; font-weight:600;
    color:white; border:none; border-radius:12px; cursor:pointer; transition:all 0.3s;
}
body.ios.mode-price      button.calc-btn { background:linear-gradient(45deg,#3b82f6,#6366f1); }
body.ios.mode-price      button.calc-btn:hover { box-shadow:0 8px 25px rgba(59,130,246,0.4); transform:translateY(-2px); }
body.ios.mode-uc         button.calc-btn { background:linear-gradient(45deg,#10b981,#059669); }
body.ios.mode-uc         button.calc-btn:hover { box-shadow:0 8px 25px rgba(16,185,129,0.4); transform:translateY(-2px); }
body.android.mode-price  button.calc-btn { background:linear-gradient(45deg,#3dba74,#34a853); }
body.android.mode-price  button.calc-btn:hover { box-shadow:0 8px 25px rgba(52,168,83,0.4); transform:translateY(-2px); }
body.android.mode-uc     button.calc-btn { background:linear-gradient(45deg,#ec4899,#db2777); }
body.android.mode-uc     button.calc-btn:hover { box-shadow:0 8px 25px rgba(236,72,153,0.4); transform:translateY(-2px); }
body.midasbuy.mode-price button.calc-btn { background:linear-gradient(45deg,#fbbf24,#f59e0b); color:#1a1000; }
body.midasbuy.mode-price button.calc-btn:hover { box-shadow:0 8px 25px rgba(251,191,36,0.4); transform:translateY(-2px); }
body.midasbuy.mode-uc    button.calc-btn { background:linear-gradient(45deg,#fcd34d,#d97706); color:#1a1000; }
body.midasbuy.mode-uc    button.calc-btn:hover { box-shadow:0 8px 25px rgba(251,191,36,0.4); transform:translateY(-2px); }
button.calc-btn:disabled { opacity:0.7; transform:none !important; }

.result { margin-top:20px; padding:20px; border-radius:15px; display:none; }
.result.show { display:block; animation:fadeIn 0.35s ease; }
body.ios.mode-price      .result { background:rgba(15,23,42,0.6); }
body.ios.mode-uc         .result { background:rgba(5,25,15,0.6); }
body.android.mode-price  .result { background:rgba(5,20,12,0.6); }
body.android.mode-uc     .result { background:rgba(20,5,20,0.6); }
body.midasbuy.mode-price .result { background:rgba(25,18,0,0.7); }
body.midasbuy.mode-uc    .result { background:rgba(25,15,0,0.7); }

.result h3 { margin-bottom:6px; font-size:0.93rem; color:#9ca3af; }
.price-highlight { font-size:1.8rem; font-weight:800; text-align:center; margin:8px 0; }
body.ios.mode-price      .price-highlight { color:#fbbf24; }
body.ios.mode-uc         .price-highlight { color:#34d399; }
body.android.mode-price  .price-highlight { color:#6ee7b7; }
body.android.mode-uc     .price-highlight { color:#f9a8d4; }
body.midasbuy.mode-price .price-highlight { color:#fbbf24; }
body.midasbuy.mode-uc    .price-highlight { color:#fcd34d; }

.sub-info { text-align:center; margin-bottom:16px; font-size:0.87rem; color:#9ca3af; line-height:1.7; }
.sub-info strong { color:#e5e7eb; }

.package-item { padding:11px 14px; border-radius:8px; margin-bottom:7px; display:flex; justify-content:space-between; font-size:0.92rem; }
body.ios.mode-price      .package-item { background:rgba(30,41,59,0.5);  border-left:3px solid #60a5fa; }
body.ios.mode-uc         .package-item { background:rgba(5,30,20,0.5);   border-left:3px solid #34d399; }
body.android.mode-price  .package-item { background:rgba(5,25,14,0.5);   border-left:3px solid #3dba74; }
body.android.mode-uc     .package-item { background:rgba(40,5,40,0.5);   border-left:3px solid #f472b6; }
body.midasbuy.mode-price .package-item { background:rgba(35,25,0,0.5);   border-left:3px solid #fbbf24; }
body.midasbuy.mode-uc    .package-item { background:rgba(35,20,0,0.5);   border-left:3px solid #f59e0b; }

.mode-toggle-wrapper { margin-top:22px; display:flex; justify-content:center; }
.mode-pill {
    display:flex; background:rgba(0,0,0,0.3); border-radius:50px;
    padding:4px; gap:4px; position:relative; border:1px solid rgba(255,255,255,0.08);
}
.mode-pill .m-slider {
    position:absolute; top:4px; height:calc(100% - 8px);
    border-radius:46px; transition:all 0.4s cubic-bezier(0.34,1.56,0.64,1); z-index:1;
}
body.ios.mode-price      .mode-pill .m-slider { background:linear-gradient(45deg,#3b82f6,#6366f1); box-shadow:0 3px 12px rgba(59,130,246,0.4); }
body.ios.mode-uc         .mode-pill .m-slider { background:linear-gradient(45deg,#10b981,#059669); box-shadow:0 3px 12px rgba(16,185,129,0.4); }
body.android.mode-price  .mode-pill .m-slider { background:linear-gradient(45deg,#3dba74,#34a853); box-shadow:0 3px 12px rgba(52,168,83,0.4); }
body.android.mode-uc     .mode-pill .m-slider { background:linear-gradient(45deg,#ec4899,#db2777); box-shadow:0 3px 12px rgba(236,72,153,0.4); }
body.midasbuy.mode-price .mode-pill .m-slider { background:linear-gradient(45deg,#fbbf24,#f59e0b); box-shadow:0 3px 12px rgba(251,191,36,0.4); }
body.midasbuy.mode-uc    .mode-pill .m-slider { background:linear-gradient(45deg,#fcd34d,#d97706); box-shadow:0 3px 12px rgba(251,191,36,0.4); }
.mode-pill .m-tab {
    position:relative; z-index:2; padding:10px 20px; border-radius:46px;
    font-size:0.87rem; font-weight:600; cursor:pointer; border:none;
    background:transparent; color:rgba(255,255,255,0.38); transition:color 0.3s; white-space:nowrap;
}
.mode-pill .m-tab.active { color:#fff; }

.version { position:fixed; bottom:10px; right:15px; font-size:11px; color:rgba(255,255,255,0.22); }
.loading { display:inline-block; width:16px; height:16px; border:2px solid rgba(255,255,255,0.3); border-radius:50%; border-top-color:#fff; animation:spin 0.8s linear infinite; vertical-align:middle; }
@keyframes spin   { to{transform:rotate(360deg)} }
@keyframes fadeIn { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
