/* DupliSelf — Global Styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0f0f1a;
    color: #eee;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: #e94560; text-decoration: none; transition: color 0.2s ease; }
a:hover { color: #ff6b81; }

img { max-width: 100%; height: auto; }

/* Nav */
#main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    background: #13132a;
    border-bottom: 1px solid #222240;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

#main-nav .logo {
    font-size: 20px;
    font-weight: 700;
    color: #eee;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-links a {
    color: #99a;
    font-size: 13px;
    font-weight: 500;
}

.nav-links a:hover { color: #eee; }

/* Buttons */
.btn-primary, .btn-outline, button[type="submit"] {
    display: inline-block;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    font-family: inherit;
}

.btn-primary, button[type="submit"] {
    background: #e94560;
    color: #fff;
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.2);
}
.btn-primary:hover, button[type="submit"]:hover {
    background: #ff6b81;
    color: #fff;
    box-shadow: 0 4px 14px rgba(233, 69, 96, 0.3);
}

.btn-outline {
    background: transparent;
    color: #99a;
    border: 1px solid #333355;
}
.btn-outline:hover {
    border-color: #e94560;
    color: #e94560;
}

.btn-large {
    padding: 14px 36px;
    font-size: 16px;
    border-radius: 10px;
}

/* Forms */
label {
    display: block;
    margin-bottom: 18px;
    font-size: 13px;
    color: #99a;
    font-weight: 500;
}

label .desc {
    display: block;
    font-size: 12px;
    color: #667;
    margin-top: 2px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
textarea,
select {
    display: block;
    width: 100%;
    padding: 10px 14px;
    margin-top: 6px;
    background: #111130;
    border: 1px solid #2a2a4a;
    border-radius: 8px;
    color: #dde;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.15s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Footer */
#footer {
    margin-top: auto;
    padding: 28px;
    text-align: center;
    border-top: 1px solid #1a1a30;
    color: #445;
    font-size: 12px;
}

#footer a { color: #556; }
#footer a:hover { color: #e94560; }
#footer p { margin: 4px 0; }

/* Site wrap */
#site-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utility */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }
.text-muted { color: #778; }
.mt-1 { margin-top: 16px; }
.mt-2 { margin-top: 32px; }
.mb-1 { margin-bottom: 16px; }
.mb-2 { margin-bottom: 32px; }

/* Auth pages */
.auth-wrap {
    max-width: 420px;
    margin: 48px auto;
    padding: 32px;
    background: #15152e;
    border-radius: 12px;
    border: 1px solid #2a2a4a;
}

.auth-wrap h1 {
    font-size: 24px;
    margin-bottom: 8px;
}

.auth-wrap p.subtitle {
    color: #778;
    margin-bottom: 24px;
    font-size: 14px;
}

.auth-wrap button[type="submit"] {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
}

.auth-wrap .alt-link {
    text-align: center;
    margin-top: 16px;
    font-size: 14px;
    color: #778;
}

.form-response {
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    display: none;
}
.form-response.error { display: block; background: rgba(255,71,87,0.1); color: #ff6b7a; border: 1px solid rgba(255,71,87,0.2); }
.form-response.success { display: block; background: rgba(46,213,115,0.1); color: #5be88e; border: 1px solid rgba(46,213,115,0.2); }

/* Checkbox */
.checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}
.checkbox-wrap input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #e94560;
}
.checkbox-wrap span {
    font-size: 13px;
    color: #aab;
}

/* Landing page */
.hero-logo {
    display: block;
    margin: 0 auto 24px;
    max-width: 100%;
    height: auto;
}

.landing-hero {
    text-align: center;
    padding: 64px 24px 48px;
    max-width: 700px;
    margin: 0 auto;
}

.landing-hero h1 {
    font-size: 44px;
    line-height: 1.12;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #fff 30%, #e94560);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.landing-hero p {
    font-size: 17px;
    color: #889;
    margin-bottom: 32px;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto 64px;
    padding: 0 24px;
}

.feature-card {
    background: linear-gradient(135deg, #16162e, #1a1a2e);
    border: 1px solid #2a2a4a;
    border-radius: 14px;
    padding: 28px;
    transition: border-color 0.2s ease;
}

.feature-card:hover {
    border-color: #3a3a5a;
}

.feature-card .icon {
    font-size: 32px;
    margin-bottom: 14px;
    color: #e94560;
}

.feature-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.feature-card p {
    font-size: 14px;
    color: #889;
    line-height: 1.6;
}

.how-it-works {
    max-width: 700px;
    margin: 0 auto 64px;
    padding: 0 24px;
}

.how-it-works h2 {
    text-align: center;
    font-size: 29px;
    margin-bottom: 32px;
}

.step {
    display: flex;
    gap: 19px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.step-num {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: #e94560;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.step-text h3 {
    font-size: 16px;
    margin-bottom: 3px;
}

.step-text p {
    font-size: 14px;
    color: #aab;
}

/* Responsive */
@media (max-width: 640px) {
    #main-nav {
        padding: 13px 16px;
    }
    .nav-links { gap: 13px; }
    .landing-hero h1 { font-size: 32px; }
    .landing-hero { padding: 40px 16px 32px; }
    .auth-wrap { margin: 24px 16px; padding: 24px; }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #2a2a4a;
    border-top-color: #e94560;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* 404 page */
.error-page {
    text-align: center;
    padding: 64px 24px;
}
.error-page h1 { font-size: 64px; color: #e94560; }
.error-page p { color: #aab; margin: 16px 0; }

/* PWA Install Modal & Update Banner */
.pwa-modal{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.8);display:flex;justify-content:center;align-items:center;z-index:10000;animation:pwa-fade-in .3s ease}
@keyframes pwa-fade-in{from{opacity:0}to{opacity:1}}
.pwa-modal-content{background:linear-gradient(135deg,#1a1a2e 0%,#252540 100%);border:1px solid rgba(108,92,231,.3);border-radius:16px;padding:24px;max-width:340px;width:90%;position:relative;box-shadow:0 12px 40px rgba(0,0,0,.6);animation:pwa-slide-up .3s ease}
@keyframes pwa-slide-up{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}
.pwa-modal-close{position:absolute;top:12px;right:12px;background:none;border:none;color:#888;font-size:24px;cursor:pointer;line-height:1;padding:4px}
.pwa-modal-close:hover{color:#fff}
.pwa-modal h3{margin:0 0 12px;color:#fff;font-size:18px}
.pwa-modal p{color:#999;font-size:13px;line-height:1.5;margin:0 0 16px}
.pwa-step{display:flex;align-items:flex-start;gap:10px;margin-bottom:12px;color:#ccc;font-size:13px;line-height:1.4}
.pwa-step:last-child{margin-bottom:16px}
.pwa-step strong{color:#6c5ce7}
.pwa-step-num{width:22px;height:22px;min-width:22px;background:rgba(108,92,231,.15);border:1px solid rgba(108,92,231,.4);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#a29bfe}
.pwa-dont-show{display:flex;align-items:center;gap:8px;cursor:pointer;margin-bottom:14px;color:#777;font-size:12px;position:relative;padding-left:30px}
.pwa-dont-show input[type="checkbox"]{position:absolute;opacity:0;width:0;height:0}
.pwa-checkmark{position:absolute;left:0;top:50%;transform:translateY(-50%);width:20px;height:20px;background:rgba(255,255,255,.05);border:1px solid #555;border-radius:4px}
.pwa-dont-show input:checked+.pwa-checkmark{background:rgba(108,92,231,.2);border-color:#6c5ce7}
.pwa-dont-show input:checked+.pwa-checkmark::before{content:'';position:absolute;left:4px;top:4px;right:4px;bottom:4px;background:#6c5ce7;border-radius:2px}
.pwa-dont-show:hover{color:#aaa}
.pwa-dont-show:hover .pwa-checkmark{border-color:#777}
.pwa-modal-btn{width:100%;padding:12px 20px;background:rgba(108,92,231,.2);border:1px solid rgba(108,92,231,.4);color:#fff;border-radius:8px;font-size:14px;font-weight:700;cursor:pointer;transition:background .2s,border-color .2s}
.pwa-modal-btn:hover{background:rgba(108,92,231,.35);border-color:rgba(108,92,231,.7)}
#pwa-update-banner{position:fixed;top:0;left:0;right:0;background:linear-gradient(135deg,#6c5ce7,#a29bfe);color:#fff;padding:10px 16px;display:flex;align-items:center;gap:10px;justify-content:center;z-index:10001;font-size:13px;box-shadow:0 2px 10px rgba(0,0,0,.3)}
#pwa-update-banner button{padding:5px 14px;border-radius:4px;cursor:pointer;font-weight:600;font-size:12px;border:none}
#pwa-update-banner .pwa-update-btn{background:#fff;color:#333}
#pwa-update-banner .pwa-dismiss-btn{background:transparent;border:1px solid rgba(255,255,255,.4);color:#fff}
