/* ShareText.club — Shared Styles (matches homepage) */
*{margin:0;padding:0;box-sizing:border-box}

:root {
    --primary: #6C63FF;
    --primary-dark: #5A52E0;
    --accent: #FF6B9D;
    --bg: #FAFBFE;
    --card: #FFFFFF;
    --text: #1A1A2E;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #F0F0F5;
    --shadow-sm: 0 1px 3px rgba(108, 99, 255, 0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(108, 99, 255, 0.08), 0 2px 4px rgba(0,0,0,0.03);
    --radius: 16px;
    --radius-sm: 10px;
}

@media(prefers-color-scheme:dark) {
    :root {
        --bg: #0F1117;
        --card: #1A1D2E;
        --text: #F1F3F8;
        --text-secondary: #A0A8C0;
        --text-muted: #6B7280;
        --border: #2A2F40;
    }
}
[data-theme="dark"] {
    --bg: #0F1117;
    --card: #1A1D2E;
    --text: #F1F3F8;
    --text-secondary: #A0A8C0;
    --text-muted: #6B7280;
    --border: #2A2F40;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* === Premium Header (same as homepage) === */
.st-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 32px;
    height: 72px;
    min-height: 72px;
    flex-shrink: 0;
    background: rgba(250, 251, 254, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
[data-theme="dark"] .st-header { background: rgba(15, 17, 23, 0.92); }

.st-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text);
    white-space: nowrap;
}
.st-header .logo span { color: var(--text); }
.st-header .logo .logo-club { color: var(--primary); }
.st-header .logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), #8B5CF6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
}

/* Nav */
.st-header nav { display: flex; align-items: center; gap: 4px; }
.st-header nav > a {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.st-header nav > a:hover { color: var(--text); background: var(--border); }

/* Dropdowns */
.st-dd { position: relative; }
.st-dd > button {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}
.st-dd > button::after { content: '▾'; font-size: 0.65rem; opacity: 0.5; }
.st-dd:hover > button { color: var(--text); background: var(--border); }

.st-dd-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 380px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 8px 20px rgba(0,0,0,0.06);
    padding: 16px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1001;
}
.st-dd:hover .st-dd-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
[data-theme="dark"] .st-dd-menu { box-shadow: 0 20px 60px rgba(0,0,0,0.5); }

.st-dd-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: all 0.15s;
}
.st-dd-menu a:hover { background: var(--bg); color: var(--primary); }

/* Header Right */
.st-header .right { display: flex; align-items: center; gap: 12px; }
.st-header .right a {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}
.st-header .right a:hover { color: var(--primary); }
.st-header .theme-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px solid var(--border);
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.st-header .theme-btn:hover { border-color: var(--primary); }

@media(max-width: 768px) {
    .st-header nav { display: none; }
    .st-header { padding: 0 16px; }
}

/* === Page Content === */
.container { max-width: 800px; margin: 0 auto; padding: 24px 20px; }
.hero { text-align: center; margin-bottom: 32px; }
.hero h1 { font-size: 1.8rem; font-weight: 800; margin-bottom: 8px; }
.hero p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }

.tool-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}

textarea, .input-field {
    width: 100%;
    min-height: 180px;
    padding: 16px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-family: 'Plus Jakarta Sans', monospace;
    font-size: 0.9rem;
    background: var(--bg);
    color: var(--text);
    resize: vertical;
    outline: none;
    transition: border 0.2s;
}
textarea:focus, .input-field:focus { border-color: var(--primary); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(108, 99, 255, 0.3); }
.btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); box-shadow: none; transform: none; }

.actions { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.result {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.88rem;
    min-height: 60px;
    white-space: pre-wrap;
    word-break: break-word;
}
.stats { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 12px; font-size: 0.85rem; color: var(--text-muted); }
.stats span { font-weight: 700; color: var(--text); }

.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}
.footer a { color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.footer a:hover { color: var(--primary); }

.result-box { margin-top: 20px; padding: 20px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; text-align: center; }
.result-box .code { font-size: 2rem; font-weight: 800; letter-spacing: 4px; color: var(--primary); margin: 12px 0; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }

/* Tool Grid (homepage) */
.tools-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tools-grid a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 18px;
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    gap: 10px;
}
.tools-grid a:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border-color: var(--primary);
}
@media(max-width: 900px) { .tools-grid { grid-template-columns: repeat(3, 1fr); } }
@media(max-width: 600px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
