@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700;800&display=swap');
@import url('https://cdn.jsdelivr.net/npm/remixicon@4.3.0/fonts/remixicon.css');

/* ===== RESET & TOKENS ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

:root {
    --bg:           #0e0e0e;
    --bg2:          #141414;
    --bg3:          #1a1a1a;
    --card:         #161616;
    --border:       #272727;
    --border2:      #333;
    --text:         #e8e8e8;
    --text2:        #999;
    --text3:        #555;
    --accent:       #00d97e;
    --accent-dim:   rgba(0,217,126,.12);
    --accent-glow:  0 0 24px rgba(0,217,126,.25);
    --danger:       #ff4757;
    --danger-dim:   rgba(255,71,87,.12);
    --warn:         #ffa502;
    --warn-dim:     rgba(255,165,2,.1);
    --radius:       10px;
    --radius-lg:    16px;
    --shadow:       0 4px 32px rgba(0,0,0,.6);
    --tr:           .18s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    background: rgba(14,14,14,.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--text);
}
.header-logo .lo-accent { color: var(--accent); }

.header-tagline {
    font-size: 13px;
    color: var(--text3);
    flex: 1;
}

.header-nav a {
    font-size: 13px;
    color: var(--text2);
    padding: 6px 12px;
    border-radius: 6px;
    transition: color var(--tr), background var(--tr);
}
.header-nav a:hover { color: var(--text); background: var(--bg3); }

/* ===== MAIN LAYOUT ===== */
.main { padding-top: 60px; }

/* ===== HERO ===== */
.hero {
    padding: 80px 24px 56px;
    text-align: center;
    background: radial-gradient(ellipse at 50% -10%, rgba(0,217,126,.08) 0%, transparent 65%);
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-dim);
    border: 1px solid rgba(0,217,126,.25);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 100px;
    margin-bottom: 28px;
}
.hero h1 {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 20px;
}
.hero p {
    font-size: 16px;
    color: var(--text2);
    max-width: 520px;
    margin: 0 auto;
}

/* ===== CREATE SECTION ===== */
.create-section {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px 48px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}
.tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text2);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color var(--tr), border-color var(--tr), background var(--tr);
    margin-bottom: -1px;
}
.tab:hover { color: var(--text); background: var(--bg3); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); background: var(--accent-dim); }
.tab i { font-size: 16px; }

/* ===== TAB CONTENT ===== */
.tab-content { padding: 20px; }
.tab-content.hidden { display: none; }

textarea#text-input {
    width: 100%;
    min-height: 180px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 14px 16px;
    resize: vertical;
    transition: border-color var(--tr);
}
textarea#text-input:focus { border-color: var(--accent); }
textarea#text-input::placeholder { color: var(--text3); }

/* ===== DROPZONE ===== */
.dropzone {
    border: 2px dashed var(--border2);
    border-radius: var(--radius);
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--tr), background var(--tr);
}
.dropzone:hover, .dropzone.drag-over {
    border-color: var(--accent);
    background: var(--accent-dim);
}
.dropzone i { font-size: 36px; color: var(--text3); margin-bottom: 12px; display: block; }
.dropzone p { font-size: 14px; color: var(--text2); margin-bottom: 4px; }
.dropzone .link { color: var(--accent); }
.dropzone small { color: var(--text3); font-size: 12px; }

.file-selected {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
}
.file-selected i { font-size: 20px; color: var(--accent); flex-shrink: 0; }
.file-selected span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text2); }
.file-selected.hidden { display: none; }

.btn-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--text3);
    transition: color var(--tr), background var(--tr);
    flex-shrink: 0;
}
.btn-icon:hover { color: var(--danger); background: var(--danger-dim); }

/* ===== FORM FOOTER ===== */
.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border);
}

.ttl-group { display: flex; align-items: center; gap: 10px; }
.ttl-group label { font-size: 13px; color: var(--text3); white-space: nowrap; }

.ttl-pills { display: flex; gap: 6px; }
.ttl-pill {
    padding: 5px 12px;
    border-radius: 100px;
    border: 1px solid var(--border2);
    font-size: 12px;
    font-weight: 500;
    color: var(--text2);
    background: none;
    transition: color var(--tr), border-color var(--tr), background var(--tr);
    cursor: pointer;
}
.ttl-pill:hover { color: var(--text); border-color: var(--text3); }
.ttl-pill.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

.btn-create {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--accent);
    color: #000;
    font-size: 14px;
    font-weight: 700;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: opacity var(--tr), box-shadow var(--tr), transform var(--tr);
    white-space: nowrap;
}
.btn-create:hover { opacity: .9; box-shadow: var(--accent-glow); }
.btn-create:active { transform: scale(.97); }
.btn-create:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-create i { font-size: 16px; }

/* ===== RESULT SECTION ===== */
.result-section {
    max-width: 680px;
    margin: 0 auto 40px;
    padding: 0 20px;
}
.result-section.hidden { display: none; }

.result-card {
    background: var(--card);
    border: 1px solid rgba(0,217,126,.3);
    border-radius: var(--radius-lg);
    padding: 28px;
    position: relative;
    overflow: hidden;
}
.result-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,217,126,.04) 0%, transparent 60%);
    pointer-events: none;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.result-header i {
    font-size: 22px;
    color: var(--accent);
}
.result-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.url-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}
.url-row input {
    flex: 1;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
    padding: 10px 14px;
    min-width: 0;
}

.btn-copy {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    white-space: nowrap;
    transition: color var(--tr), border-color var(--tr), background var(--tr);
    flex-shrink: 0;
}
.btn-copy:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.btn-copy.copied { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.btn-copy i { font-size: 15px; }

.result-hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--text3);
    padding: 12px 14px;
    background: var(--warn-dim);
    border: 1px solid rgba(255,165,2,.15);
    border-radius: 8px;
}
.result-hint i { font-size: 15px; color: var(--warn); flex-shrink: 0; margin-top: 1px; }

/* ===== HOW IT WORKS ===== */
.how-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 8px 20px 80px;
    text-align: center;
}
.how-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--text2);
}
.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.how-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    text-align: left;
}
.how-icon {
    width: 44px;
    height: 44px;
    background: var(--accent-dim);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.how-icon i { font-size: 22px; color: var(--accent); }
.how-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.how-card p { font-size: 13px; color: var(--text3); line-height: 1.6; }

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== VIEW PAGE ===== */
.view-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 40px;
    background: radial-gradient(ellipse at 50% 20%, rgba(0,217,126,.05) 0%, transparent 60%);
}

.view-card {
    width: 100%;
    max-width: 520px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    text-align: center;
    box-shadow: var(--shadow);
}
.view-card.hidden { display: none; }

.view-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 32px;
}
.view-icon.default { background: var(--accent-dim); color: var(--accent); border: 2px solid rgba(0,217,126,.3); }
.view-icon.success { background: var(--accent-dim); color: var(--accent); border: 2px solid rgba(0,217,126,.3); }
.view-icon.error   { background: var(--danger-dim); color: var(--danger); border: 2px solid rgba(255,71,87,.3); }
.view-icon.loading { background: var(--bg3); border: 2px solid var(--border2); }

.view-card h1, .view-card h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 14px;
    letter-spacing: -.3px;
}

.view-card p {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.65;
    margin-bottom: 28px;
}

.view-warning {
    background: var(--warn-dim);
    border: 1px solid rgba(255,165,2,.2);
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 13px;
    color: var(--warn);
    text-align: left;
    line-height: 1.6;
    margin-bottom: 28px !important;
}
.view-warning strong { display: block; margin-bottom: 4px; }

.btn-reveal {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--accent);
    color: #000;
    font-size: 15px;
    font-weight: 700;
    border-radius: 100px;
    border: none;
    cursor: pointer;
    transition: opacity var(--tr), box-shadow var(--tr), transform var(--tr);
    margin-bottom: 16px;
}
.btn-reveal:hover { opacity: .9; box-shadow: var(--accent-glow); }
.btn-reveal:active { transform: scale(.97); }
.btn-reveal i { font-size: 18px; }

.view-small {
    font-size: 12px;
    color: var(--text3);
    margin-bottom: 0 !important;
}

/* ===== SECRET BOX (text reveal) ===== */
.secret-box {
    position: relative;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 20px;
    text-align: left;
    max-height: 360px;
    overflow: hidden;
}
.secret-content {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text);
    padding: 16px 50px 16px 16px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 360px;
    overflow-y: auto;
}
.btn-copy-secret {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-radius: 7px;
    color: var(--text3);
    font-size: 15px;
    transition: color var(--tr), border-color var(--tr), background var(--tr);
}
.btn-copy-secret:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.btn-copy-secret.copied { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* ===== DESTROYED NOTICE ===== */
.destroyed-notice {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text3);
    padding: 8px 16px;
    border-radius: 100px;
    background: rgba(255,71,87,.07);
    border: 1px solid rgba(255,71,87,.15);
}
.destroyed-notice i { font-size: 14px; color: var(--danger); }

/* ===== FILE INFO ===== */
.file-info-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 20px;
    text-align: left;
}
.file-info-box i { font-size: 24px; color: var(--accent); flex-shrink: 0; }
.file-info-box .fi-name { font-size: 14px; font-weight: 600; color: var(--text); }
.file-info-box .fi-size { font-size: 12px; color: var(--text3); }

/* ===== BACK BUTTON ===== */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid var(--border2);
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text2);
    transition: color var(--tr), border-color var(--tr), background var(--tr);
}
.btn-back:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border);
    padding: 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text3);
}
.footer a { color: var(--text3); }
.footer a:hover { color: var(--accent); }

/* ===== ERROR MSG ===== */
.error-msg {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--danger-dim);
    border: 1px solid rgba(255,71,87,.25);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--danger);
    margin-top: 12px;
}
.error-msg.visible { display: flex; }
.error-msg i { flex-shrink: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .hero { padding: 60px 20px 40px; }
    .hero h1 { font-size: 26px; }
    .form-footer { flex-direction: column; align-items: flex-start; }
    .btn-create { width: 100%; justify-content: center; }
    .view-card { padding: 36px 24px; }
    .url-row { flex-direction: column; }
    .ttl-pills { flex-wrap: wrap; }
    .how-grid { grid-template-columns: 1fr; }
    .header-tagline { display: none; }
}
