/* -------------------------------------------------------------------------
   cli-share – dark terminal aesthetic
   ------------------------------------------------------------------------- */

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

:root {
    --bg:          #0d1117;
    --surface:     #161b22;
    --border:      #30363d;
    --text:        #e6edf3;
    --muted:       #8b949e;
    --accent:      #3fb950;
    --accent-dim:  #238636;
    --warn:        #d29922;
    --danger:      #f85149;
    --link:        #58a6ff;
    --radius:      6px;
    --mono:        'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--mono);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

#app {
    width: 100%;
    max-width: 640px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.logo {
    width: 100px;
    height: 100px;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
    filter: drop-shadow(0 0 8px rgba(63, 185, 80, 0.3));
    animation: subtle-glow 2s ease-in-out infinite;
}

@keyframes subtle-glow {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(63, 185, 80, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 16px rgba(63, 185, 80, 0.5));
    }
}

header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.tagline {
    margin-top: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.tagline code {
    color: var(--link);
}

/* Drop zone */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    user-select: none;
    outline: none;
}

.drop-zone:hover,
.drop-zone:focus {
    border-color: var(--accent);
    background: #1a2530;
}

.drop-zone.dragover {
    border-color: var(--accent);
    background: #1a2530;
}

.drop-zone.has-file {
    border-color: var(--accent-dim);
    border-style: solid;
}

.drop-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: var(--muted);
}

#drop-label {
    color: var(--text);
    font-size: 1rem;
    line-height: 1.6;
}

.hint {
    color: var(--muted);
    font-size: 0.85rem;
}

/* URL box */
.url-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.url-box label {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.url-row {
    display: flex;
    gap: 0.5rem;
}

.url-row input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    outline: none;
}

.url-row input:focus {
    border-color: var(--accent);
}

.url-row button,
.curl-row button {
    background: var(--accent-dim);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    transition: background 0.15s;
    white-space: nowrap;
}

.url-row button:hover,
.curl-row button:hover {
    background: var(--accent);
    color: #000;
}

.curl-hint {
    flex: 1;
    padding: 0.6rem 0.75rem;
    background: var(--bg);
    border-radius: var(--radius);
    overflow-x: auto;
}

.curl-row {
    display: flex;
    margin-top: 0.75rem;
    gap: 0.5rem;
    align-items: center;
}

.curl-hint code {
    flex: 1;
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

/* Status area */
#status-area {
    margin-top: 1.5rem;
    text-align: center;
}

.status-msg {
    font-size: 0.95rem;
    min-height: 1.4em;
    color: var(--muted);
}

.status-msg.success { color: var(--accent); }
.status-msg.warn    { color: var(--warn); }
.status-msg.error   { color: var(--danger); }

/* Progress bar */
.progress-bar-wrap {
    margin-top: 0.75rem;
    background: var(--border);
    border-radius: 99px;
    height: 6px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent);
    border-radius: 99px;
    transition: width 0.1s linear;
}

.progress-label {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--muted);
    min-height: 1.2em;
}

/* Reset button */
.reset-btn {
    display: block;
    margin: 1.5rem auto 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    cursor: pointer;
    font-family: var(--mono);
    font-size: 0.85rem;
    padding: 0.5rem 1.25rem;
    transition: border-color 0.15s, color 0.15s;
}

.reset-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Utility */
.hidden { display: none !important; }

/* Pulsing dot for "waiting" state */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

.pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.4s ease-in-out infinite;
    margin-right: 6px;
    vertical-align: middle;
}
