/* Lewds.link - Dark, adult-friendly theme */
:root {
    --bg: #0f0f1a;
    --card: #1a1a2e;
    --accent: #ff006e;
    --text: #ffffff;
    --muted: #a0a0b0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    transition: 0.2s;
}
.btn.primary { background: var(--accent); }
.btn.danger { background: #dc3545; }
.btn:hover { opacity: 0.9; transform: translateY(-1px); }

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}
.auth-container {
    background: var(--card);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.auth-container h1 { margin-bottom: 8px; }
.subtitle { color: var(--muted); margin-bottom: 24px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #0f0f1a;
    color: white;
    font-size: 16px;
}
.alert { padding: 12px; border-radius: 8px; margin-bottom: 16px; }
.alert.error { background: #5c1a1a; color: #ff6b6b; }
.alert.success { background: #1a5c2e; color: #6bff9f; }

.dashboard-header {
    background: var(--card);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}
.dashboard { max-width: 800px; margin: 40px auto; padding: 0 20px; flex: 1; }
.card {
    background: var(--card);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}
.link-list { list-style: none; margin-top: 16px; }
.link-list li { padding: 12px 0; border-bottom: 1px solid #333; }
.link-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #333; gap: 12px; }
.link-item .info { flex: 1; }
.link-item .url { display: none; font-size: 12px; color: var(--muted); word-break: break-all; }
.link-item.expanded .url { display: block; }
.link-actions { display: flex; gap: 8px; }

/* Public profile */
.public-profile { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 40px 20px; flex: 1; }
.profile-container { text-align: center; max-width: 500px; width: 100%; }
.avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 4px solid var(--accent);
}
.avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    font-size: 48px;
    font-weight: bold;
    color: white;
}
.bio { color: var(--muted); margin: 16px 0 32px; }
.links { display: flex; flex-direction: column; gap: 12px; }
.link-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    text-align: left;
    transition: 0.2s;
    gap: 12px;
    background: var(--accent);
}
.link-btn .icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.link-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}
.powered { margin-top: 40px; font-size: 14px; color: var(--muted); }

.home { text-align: center; padding: 80px 20px; flex: 1; }
.home h1 { font-size: 48px; margin-bottom: 8px; }
.hero { margin-top: 60px; }
.hero h2 { font-size: 36px; margin-bottom: 16px; }
.cta { margin-top: 32px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* Footer */
.site-footer {
    text-align: center;
    padding: 20px;
    color: var(--muted);
    font-size: 14px;
    background: var(--card);
    margin-top: auto;
    border-top: 1px solid #333;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    align-items: center;
    justify-content: center;
}
.modal.active { display: flex; }
.modal-content {
    background: var(--card);
    padding: 30px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    position: relative;
}
.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: var(--muted);
}
.modal-close:hover { color: white; }

/* Sortable */
.sortable-ghost { opacity: 0.4; }
.handle { cursor: grab; color: var(--muted); margin-right: 8px; }