*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue-dark:#0f3460;--blue-mid:#1a56a0;--blue-light:#2a7de1;--blue-pale:#e8f1fd;
  --white:#ffffff;--bg:#f4f8ff;--text-main:#1a1f36;--text-muted:#5a6478;
  --border:#dce6f7;--radius:12px;--shadow:0 2px 12px rgba(15,52,96,0.08);
  --green:#16a34a;--red:#dc2626;--red-pale:#fee2e2;
}
body { font-family:'Plus Jakarta Sans',Arial,sans-serif; background:var(--bg); color:var(--text-main); line-height:1.6; }
.skip-link { position:absolute; top:-100px; left:16px; background:var(--blue-dark); color:#fff; padding:8px 16px; border-radius:0 0 var(--radius) var(--radius); font-size:14px; text-decoration:none; z-index:999; transition:top 0.2s; }
.skip-link:focus { top:0; }
.site-header { background:var(--white); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:100; }
.nav-inner { max-width:1100px; margin:0 auto; padding:0 24px; height:62px; display:flex; align-items:center; justify-content:space-between; }
.logo { font-size:22px; font-weight:700; color:var(--blue-dark); letter-spacing:-0.5px; text-decoration:none; }
.logo span { color:var(--blue-light); }
.nav-links { display:flex; gap:4px; list-style:none; }
.nav-links a { text-decoration:none; font-size:14px; font-weight:500; color:var(--text-muted); padding:6px 14px; border-radius:8px; transition:background 0.2s,color 0.2s; }
.nav-links a:hover { background:var(--blue-pale); color:var(--blue-light); }
.container { max-width:1100px; margin:0 auto; padding:0 24px; }
.breadcrumb-bar { background:var(--white); border-bottom:1px solid var(--border); padding:10px 0; }
.breadcrumb { list-style:none; display:flex; align-items:center; gap:6px; font-size:13px; color:var(--text-muted); }
.breadcrumb a { color:var(--blue-light); text-decoration:none; }
.breadcrumb li[aria-current="page"] { color:var(--text-main); font-weight:500; }
.tool-hero { background:linear-gradient(135deg,var(--blue-dark) 0%,var(--blue-mid) 60%,var(--blue-light) 100%); color:var(--white); text-align:center; padding:48px 24px 40px; }
.tool-hero-icon { width:64px; height:64px; border-radius:16px; background:rgba(255,255,255,0.15); border:1px solid rgba(255,255,255,0.3); display:flex; align-items:center; justify-content:center; font-size:26px; margin:0 auto 16px; }
.tool-hero h1 { font-size:clamp(24px,4vw,38px); font-weight:700; letter-spacing:-0.5px; margin-bottom:12px; }
.tool-hero p { font-size:16px; opacity:0.88; max-width:520px; margin:0 auto; }
.tool-section { padding:40px 0; }
.tool-card-main { background:var(--white); border:1px solid var(--border); border-radius:16px; padding:32px; max-width:760px; margin:0 auto; box-shadow:var(--shadow); }

/* Upload zone */
.upload-zone { border:2px dashed var(--border); border-radius:var(--radius); padding:48px 24px; text-align:center; cursor:pointer; transition:border-color 0.2s,background 0.2s; position:relative; }
.upload-zone:hover,.upload-zone.drag-over { border-color:var(--blue-light); background:var(--blue-pale); }
.upload-zone i { font-size:40px; color:var(--blue-light); margin-bottom:14px; display:block; }
.upload-title { font-size:16px; font-weight:600; color:var(--text-main); margin-bottom:4px; }
.upload-sub { font-size:13px; color:var(--text-muted); }
.upload-zone input[type="file"] { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; }

/* File info row */
.file-info { display:flex; align-items:center; gap:14px; background:var(--blue-pale); border:1px solid var(--border); border-radius:var(--radius); padding:12px 16px; }
.file-name { font-size:14px; font-weight:600; color:var(--text-main); word-break:break-all; }
.file-meta { font-size:12px; color:var(--text-muted); margin-top:2px; }
.file-remove { margin-left:auto; background:none; border:none; color:var(--text-muted); cursor:pointer; font-size:16px; padding:4px; border-radius:50%; transition:color 0.2s,background 0.2s; flex-shrink:0; }
.file-remove:hover { color:var(--red); background:var(--red-pale); }

/* Crop hint */
.crop-hint { font-size:13px; color:var(--text-muted); margin-bottom:10px; display:flex; align-items:center; gap:6px; }
.crop-hint i { color:var(--blue-light); }

/* Canvas container */
.crop-container { position:relative; display:block; border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; margin-bottom:10px; cursor:crosshair; background:#1a1f36; line-height:0; }
#cropCanvas { display:block; max-width:100%; height:auto; user-select:none; -webkit-user-drag:none; touch-action:none; }

/* Crop info row */
.crop-info-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; min-height:28px; }
.crop-dims { font-size:13px; font-weight:600; color:var(--text-muted); }
.btn-clear-sel { display:none; align-items:center; gap:5px; background:none; border:1px solid var(--border); border-radius:6px; padding:4px 10px; font-size:12px; color:var(--text-muted); cursor:pointer; font-family:inherit; transition:color 0.15s,border-color 0.15s; }
.btn-clear-sel:hover { color:var(--red); border-color:var(--red); }

/* Options */
.crop-options { background:var(--bg); border:1px solid var(--border); border-radius:var(--radius); padding:16px; margin-bottom:16px; }
.option-label { font-size:12px; font-weight:600; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.8px; display:block; margin-bottom:8px; }
.radio-label { display:flex; align-items:center; gap:6px; font-size:14px; cursor:pointer; }
input[type="range"] { accent-color:var(--blue-light); cursor:pointer; }

/* Crop button */
.btn-action { width:100%; padding:14px; border-radius:var(--radius); background:var(--blue-light); color:#fff; border:none; font-size:16px; font-weight:600; cursor:pointer; display:flex; align-items:center; justify-content:center; gap:10px; transition:background 0.2s,transform 0.15s,opacity 0.2s; font-family:inherit; }
.btn-action:hover:not(:disabled) { background:var(--blue-mid); transform:translateY(-1px); }
.btn-action:disabled { opacity:0.4; cursor:not-allowed; }

/* Error */
.tool-error { text-align:center; padding:24px 0; }
.tool-error .fa-exclamation-triangle { font-size:40px; color:var(--red); margin-bottom:12px; display:block; }
.tool-error p { font-size:15px; color:var(--text-muted); margin-bottom:16px; }
.btn-again { display:inline-block; background:none; border:none; color:var(--blue-light); font-size:14px; font-weight:500; cursor:pointer; text-decoration:underline; font-family:inherit; }

/* Trust row */
.trust-row { display:flex; justify-content:center; flex-wrap:wrap; gap:20px; margin-top:20px; max-width:760px; margin-left:auto; margin-right:auto; }
.trust-row span { font-size:13px; color:var(--text-muted); display:flex; align-items:center; gap:6px; }
.trust-row i { color:var(--blue-light); }

/* Content */
.content-section { padding:56px 0; }
.content-grid { display:grid; grid-template-columns:1fr 300px; gap:40px; align-items:start; }
.content-main h2 { font-size:22px; font-weight:700; color:var(--blue-dark); margin:32px 0 12px; }
.content-main h2:first-child { margin-top:0; }
.content-main h3 { font-size:17px; font-weight:600; color:var(--text-main); margin:24px 0 10px; }
.content-main p { font-size:15px; color:var(--text-muted); margin-bottom:14px; line-height:1.7; }
.guide-steps,.guide-list { margin:0 0 16px 20px; display:flex; flex-direction:column; gap:10px; }
.guide-steps li,.guide-list li { font-size:15px; color:var(--text-muted); line-height:1.65; }
.guide-steps li strong,.guide-list li strong { color:var(--text-main); }
.content-sidebar { display:flex; flex-direction:column; gap:20px; }
.sidebar-card { background:var(--white); border:1px solid var(--border); border-radius:var(--radius); padding:20px; box-shadow:var(--shadow); }
.sidebar-card h3 { font-size:13px; font-weight:700; color:var(--blue-dark); margin-bottom:14px; text-transform:uppercase; letter-spacing:0.8px; }
.sidebar-tools { list-style:none; display:flex; flex-direction:column; gap:2px; }
.sidebar-tools a { display:flex; align-items:center; gap:10px; padding:9px 10px; border-radius:8px; font-size:14px; font-weight:500; color:var(--text-main); text-decoration:none; transition:background 0.15s,color 0.15s; }
.sidebar-tools a:hover { background:var(--blue-pale); color:var(--blue-light); }
.sidebar-tools i { color:var(--blue-light); width:16px; text-align:center; flex-shrink:0; }
.tip-list { list-style:none; display:flex; flex-direction:column; gap:10px; }
.tip-list li { font-size:13px; color:var(--text-muted); display:flex; align-items:flex-start; gap:8px; line-height:1.5; }
.tip-list .fa-lightbulb { color:#eab308; margin-top:2px; flex-shrink:0; }
.section-alt { background:var(--white); border-top:1px solid var(--border); border-bottom:1px solid var(--border); padding:56px 0; }
.section-alt h2 { font-size:26px; font-weight:700; color:var(--blue-dark); margin-bottom:10px; }
.section-intro { font-size:15px; color:var(--text-muted); margin-bottom:28px; }
.faq-list { display:flex; flex-direction:column; gap:12px; }
.faq-item { background:var(--bg); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; }
.faq-item summary { padding:16px 20px; font-size:15px; font-weight:600; color:var(--text-main); cursor:pointer; list-style:none; display:flex; justify-content:space-between; align-items:center; }
.faq-item summary::-webkit-details-marker { display:none; }
.faq-item summary::after { content:'+'; font-size:20px; font-weight:400; color:var(--blue-light); transition:transform 0.2s; }
.faq-item[open] summary::after { transform:rotate(45deg); }
.faq-item[open] summary { border-bottom:1px solid var(--border); color:var(--blue-dark); }
.faq-item p { padding:16px 20px; font-size:14px; color:var(--text-muted); line-height:1.65; }
.site-footer { background:var(--blue-dark); color:rgba(255,255,255,0.7); padding:48px 0 0; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:32px; padding-bottom:40px; }
.footer-brand { font-size:20px; font-weight:700; color:#fff; margin-bottom:10px; }
.footer-text { font-size:14px; line-height:1.6; max-width:220px; }
.footer-heading { font-size:12px; font-weight:700; letter-spacing:1px; text-transform:uppercase; color:rgba(255,255,255,0.5); margin-bottom:14px; }
.footer-links { list-style:none; display:flex; flex-direction:column; gap:10px; }
.footer-links a { color:rgba(255,255,255,0.7); text-decoration:none; font-size:14px; transition:color 0.2s; }
.footer-links a:hover { color:#fff; }
.footer-bottom { border-top:1px solid rgba(255,255,255,0.1); padding:20px 24px; }
.footer-meta { font-size:13px; color:rgba(255,255,255,0.45); text-align:center; }
@media(max-width:900px){.content-grid{grid-template-columns:1fr;}.footer-grid{grid-template-columns:1fr 1fr;}}
@media(max-width:540px){.nav-links{display:none;}.tool-card-main{padding:20px 16px;}.footer-grid{grid-template-columns:1fr;}}
