/* OilWallet - Unified Stylesheet */
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Noto Sans KR',-apple-system,sans-serif;background:#f5f6fa;min-height:100vh;overflow-x:hidden}

/* Page Layout with Side Ads */
.page-layout{display:flex;justify-content:center;align-items:flex-start;min-height:100vh}
.main-content{width:100%;max-width:430px;flex-shrink:0}
.side-ad{width:160px;position:sticky;top:20px;display:none;flex-shrink:0;padding:10px}
.side-ad-left{margin-right:10px}
.side-ad-right{margin-left:10px}
@media(min-width:780px){.side-ad{display:block}}
@media(min-width:900px){.side-ad{width:200px}}

/* Header */
.header{background:linear-gradient(135deg,#1a1a2e,#16213e);color:#fff;padding:12px 20px 14px;display:flex;justify-content:space-between;align-items:center}
.header h1{font-size:20px;font-weight:700}
.header h1 em{font-style:normal;color:#ffd700}
.tier-badge{background:rgba(255,255,255,0.15);color:#aaa;font-size:11px;padding:4px 10px;border-radius:12px;font-weight:500}
.tier-badge-premium{background:linear-gradient(135deg,#ffd700,#f7931e);color:#fff;font-size:11px;padding:4px 12px;border-radius:12px;font-weight:600;box-shadow:0 2px 8px rgba(255,215,0,0.3)}

/* Weather Card */
.weather-card{margin:16px 16px;border-radius:20px;padding:28px 24px;text-align:center;position:relative;overflow:hidden;z-index:1;color:#fff;transition:all .4s}
.weather-card::after{content:'';position:absolute;top:-30px;right:-30px;width:120px;height:120px;background:rgba(255,255,255,0.1);border-radius:50%}
.weather-card::before{content:'';position:absolute;bottom:-20px;left:-20px;width:80px;height:80px;background:rgba(255,255,255,0.06);border-radius:50%}
.weather-icon{font-size:64px;margin-bottom:8px}
.weather-label{font-size:22px;font-weight:700;margin-bottom:6px;letter-spacing:-.5px}
.weather-message{font-size:15px;font-weight:400;opacity:.95;line-height:1.5}
.weather-sub{font-size:12px;opacity:.7;margin-top:8px}

/* Weather Gradients */
.w-sunny{background:linear-gradient(135deg,#ff6b35,#f7931e,#ffd700)}
.w-clearing{background:linear-gradient(135deg,#43a5dc,#7ec8e3,#f0c27f)}
.w-cloudy{background:linear-gradient(135deg,#8e9eab,#a8b8c8,#b0bec5)}
.w-rainy_clearing{background:linear-gradient(135deg,#4a7c9b,#6fa8c7,#88b5c4)}
.w-rainy{background:linear-gradient(135deg,#2c3e6b,#3a5a8c,#4a6fa5)}

/* Notice */
.notice-wrap{margin:8px 16px 12px;display:flex;flex-direction:column;gap:6px}
.notice-item{padding:10px 14px;background:#f8f9fa;border-radius:10px;font-size:11px;color:#888;line-height:1.5;display:flex;align-items:flex-start;gap:8px;border-left:3px solid #e0e0e0}
.notice-item b{color:#555}

/* Sections */
.section{margin:0 16px 16px;background:#fff;border-radius:16px;padding:20px;box-shadow:0 2px 12px rgba(0,0,0,0.06)}
.section-title{font-size:16px;font-weight:600;color:#1a1a2e;margin-bottom:16px;display:flex;align-items:center;gap:8px}

/* Badges */
.badge{font-size:11px;padding:3px 8px;border-radius:10px;font-weight:500;color:#fff}
.badge-up{background:#e53935}
.badge-slight-up{background:#ff9800}
.badge-flat{background:#78909c}
.badge-slight-down{background:#42a5f5}
.badge-down{background:#1e88e5}

/* Fuel Summary */
.fuel-row{display:flex;justify-content:space-between;align-items:center;padding:14px 0;border-bottom:1px solid #f0f0f5}
.fuel-row:last-child{border-bottom:none}
.fuel-info{display:flex;align-items:center;gap:12px}
.fuel-icon{width:40px;height:40px;border-radius:12px;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:700}
.fuel-icon.g{background:#e8f4fd;color:#2196f3}
.fuel-icon.d{background:#fef3e2;color:#ff9800}
.fuel-name{font-size:14px;color:#666}
.fuel-price{font-size:18px;font-weight:700;color:#1a1a2e}
.fuel-change .arrow{font-size:18px;font-weight:700}
.arrow-up{color:#e53935}
.arrow-down{color:#1e88e5}
.arrow-flat{color:#78909c}
.fuel-change .diff{font-size:12px;color:#999;margin-top:2px;text-align:right}

/* Premium Accent */
.premium-accent{display:flex;align-items:center;gap:6px;margin-top:12px;padding:10px 14px;background:linear-gradient(135deg,#fffbeb,#fff8e1);border-radius:10px;border:1px solid #ffe082}
.premium-accent-icon{font-size:16px}
.premium-accent-text{font-size:12px;color:#f57f17;font-weight:500}

/* Tab Bar */
.tab-bar{margin:0 16px 12px;display:flex;background:#e8e8f0;border-radius:12px;padding:3px}
.tab{flex:1;text-align:center;padding:10px;font-size:14px;font-weight:500;color:#888;border-radius:10px;cursor:pointer;transition:all .2s;text-decoration:none}
.tab.active{background:#fff;color:#1a1a2e;font-weight:600;box-shadow:0 1px 4px rgba(0,0,0,0.1)}

/* Chart */
.chart-area{width:100%;height:180px;position:relative}
.chart-area.premium{height:200px}
canvas{width:100%!important}
.chart-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.chart-title{font-size:16px;font-weight:600;color:#1a1a2e}
.chart-period{font-size:12px;color:#999}

/* Daily Predictions */
.daily-row{display:flex;justify-content:space-between;align-items:center;padding:11px 0;border-bottom:1px solid #f5f5f8;font-size:14px}
.daily-row:last-child{border-bottom:none}
.daily-date{color:#666;width:80px}
.daily-price{font-weight:600;color:#1a1a2e;flex:1;text-align:right}
.daily-conf{font-size:10px;color:#aaa;font-weight:400;margin-left:4px}
.daily-diff{font-size:12px;color:#999;width:70px;text-align:right}
.daily-dir{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:700;margin-left:10px}
.daily-dir.up{background:#fdecea;color:#e53935}
.daily-dir.down{background:#e3f2fd;color:#1e88e5}
.daily-dir.flat{background:#f0f0f0;color:#78909c}

/* Locked Area (Free tier) */
.locked-area{position:relative}
.locked-rows{filter:blur(6px);pointer-events:none;user-select:none}
.lock-overlay{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(transparent,rgba(255,255,255,0.95) 30%,#fff 100%);padding:40px 20px 20px;text-align:center;z-index:10}
.lock-icon{font-size:32px;margin-bottom:8px}
.lock-text{font-size:14px;color:#666;margin-bottom:12px;line-height:1.5}
.lock-text strong{color:#1a1a2e}
.upgrade-btn{display:inline-block;padding:12px 32px;background:linear-gradient(135deg,#ffd700,#f7931e);color:#fff;font-size:15px;font-weight:600;border-radius:12px;border:none;cursor:pointer;box-shadow:0 4px 12px rgba(247,147,30,0.3);font-family:inherit;text-decoration:none}

/* Region Bar */
.region-bar{margin:0 16px 12px;display:flex;align-items:center;gap:8px}
.region-label{font-size:13px;font-weight:500;color:#666;white-space:nowrap}
.region-select{flex:1;padding:10px 14px;border:1px solid #e0e0e0;border-radius:12px;font-size:14px;font-family:'Noto Sans KR',sans-serif;color:#1a1a2e;background:#fff;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23888' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:16px}
.region-select:focus{outline:none;border-color:#1a1a2e}

/* Footer & Loading */
.footer{text-align:center;padding:20px 16px 32px;font-size:12px;color:#bbb}
.loading{text-align:center;padding:40px;color:#999;font-size:14px}

/* Error Page */
.error-wrap{display:flex;justify-content:center;align-items:center;min-height:80vh;padding:16px}
.error-card{text-align:center;padding:40px;background:#fff;border-radius:16px;box-shadow:0 2px 12px rgba(0,0,0,0.06);max-width:400px;width:100%}
.error-code{font-size:48px;font-weight:700;color:#1a1a2e}
.error-msg{font-size:16px;color:#666;margin:16px 0}
.error-btn{display:inline-block;padding:12px 24px;background:#1a1a2e;color:#fff;border-radius:12px;text-decoration:none;font-size:14px;font-weight:500}

/* Bottom Ad */
.bottom-ad{margin:0 16px 16px}

/* Mid Ad (after summary) */
.mid-ad{margin:0 16px 16px}

/* Anchor Ad (mobile only, top sticky) */
.anchor-ad{position:sticky;top:0;z-index:100;background:#fff;box-shadow:0 2px 8px rgba(0,0,0,0.1);min-height:50px;overflow:hidden}
@media(min-width:780px){.anchor-ad{display:none}}

/* Test Ad Placeholder */
.test-ad{background:#f0f0f0;border:2px dashed #ccc;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#999;font-size:13px;font-weight:500;min-height:250px}

/* Ad Overlay (rewarded ad) */
.ad-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999;display:flex;align-items:center;justify-content:center}
.ad-overlay-bg{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.7);pointer-events:none}
.ad-overlay-content{position:relative;background:#fff;border-radius:16px;width:90%;max-width:400px;padding:20px;text-align:center;z-index:1}
.ad-overlay-header{margin-bottom:16px;font-size:13px;color:#999;font-weight:500}
.ad-overlay-body{min-height:250px;display:flex;align-items:center;justify-content:center;background:#f5f6fa;border-radius:12px;margin-bottom:16px;overflow:hidden}
.ad-overlay-body ins{cursor:pointer}
.ad-overlay-close{width:100%;padding:14px;background:linear-gradient(135deg,#1a1a2e,#16213e);color:#fff;font-size:15px;font-weight:600;border:none;border-radius:12px;cursor:pointer;font-family:inherit}

/* Animations */
@keyframes fadeUp{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
.weather-card{animation:fadeUp .5s ease}
.section{animation:fadeUp .6s ease}
