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

:root {
    --bg: #f7f9f9;
    --card: #ffffff;
    --text: #0f1419;
    --text-secondary: #536471;
    --border: #D4D4D4;
    --primary: #1d9bf0;
    --primary-hover: #1a8cd8;
    --danger: #f4212e;
    --success: #00ba7c;
    --radius: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

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

img { max-width: 100%; display: block; }

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
}
.containero {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 16px;
}
.landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.landing h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.landing p.subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 1.1rem;
}

.url-checker {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow);
}

.url-preview {
    display: flex;
    align-items: center;
    background: #f0f2f5;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    font-size: 1rem;
    flex-wrap: wrap;
    gap: 4px;
}

.url-preview .domain {
    color: var(--text-secondary);
}

.url-preview input {
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    outline: none;
    min-width: 100px;
    flex: 1;
}

.availability {
    font-size: 0.9rem;
    min-height: 24px;
    margin-bottom: 16px;
    font-weight: 500;
}

.availability.available { color: var(--success); }
.availability.taken { color: var(--danger); }
.availability.checking { color: var(--text-secondary); }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-hover);
    text-decoration: none;
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    background: #f0f2f5;
    text-decoration: none;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
}

.auth-card h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.auth-card .subtitle {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.15);
}

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

.error-msg {
    background: #fef2f2;
    color: var(--danger);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.success-msg {
    background: #f0fdf4;
    color: var(--success);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.profile-wrapper {
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.cover-section {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #1d9bf0, #0d6efd);
    overflow: hidden;
}

.cover-section img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cover-upload-btn,
.avatar-upload-btn {
    position: absolute;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 16px;
}

.cover-upload-btn:hover,
.avatar-upload-btn:hover {
    background: rgba(0,0,0,0.8);
}

.cover-upload-btn {
    top: 12px;
    right: 12px;
}

.avatar-section {
    position: relative;
    padding: 0 16px;
    margin-top: -50px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.avatar-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
}

.avatar-wrapper img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--card);
    object-fit: cover;
    background: #ddd;
}

.avatar-upload-btn {
    bottom: 4px;
    right: 4px;
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.profile-actions {
    margin-bottom: 8px;
}

.profile-body {
    padding: 12px 16px 24px;
}

.display-name {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 2px;
}

.city {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.about {
    font-size: 0.95rem;
    margin-bottom: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

.meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f2f5;
    color: var(--text);
    font-size: 18px;
    transition: background 0.2s, transform 0.15s;
}

.social-links a:hover {
    background: #e1e8ed;
    transform: scale(1.08);
    text-decoration: none;
}

.links-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom:40px;
}

.link-kosong,
.link-item {
    display: block;
    background: #ffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    font-weight: 600;
    color: var(--text);
    transition: background 0.2s, border-color 0.2s;
}

.link-item:hover {
    background: #eff3f4;
    border-color: #cfd9de;
    text-decoration: none;
}

.edit-header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.edit-header h1 {
    font-size: 1.15rem;
    font-weight: 700;
}

.edit-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin: 0 0 30px 0;
    box-shadow: var(--shadow);
}

.edit-section h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.char-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: right;
    margin-top: 4px;
}

.char-count.over { color: var(--danger); }

.social-edit-grid {
    display: grid;
    gap: 12px;
}

.social-edit-item {
    display: flex;
    gap: 10px;
    align-items: center;
}

.social-edit-item .icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    border-radius: 8px;
    font-size: 16px;
    flex-shrink: 0;
}
.social-edit-item .info {
  
    display: flex;
    
  
    font-size: 16px;
    flex-shrink: 0;
}
.social-edit-item input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
}

.links-edit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.link-edit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7f9f9;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: grab;
}

.link-edit-item.dragging {
    opacity: 0.5;
    background: #e8f5fe;
}

.link-edit-item .handle {
    color: var(--text-secondary);
    font-size: 18px;
    cursor: grab;
}

.link-edit-item .info {
    flex: 1;
    min-width: 0;
}

.link-edit-item .title {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-edit-item .url {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-edit-item .actions {
    display: flex;
    gap: 6px;
}

.btn-icon {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 16px;
}

.btn-icon:hover {
    background: #e1e8ed;
    color: var(--text);
}

.btn-icon.danger:hover {
    background: #fef2f2;
    color: var(--danger);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.modal h3 {
    margin-bottom: 16px;
    font-size: 1.15rem;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions .btn {
    flex: 1;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #0f1419;
    color: #fff;
    padding: 12px 20px;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.3s;
    z-index: 2000;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.top-bar {
    max-width: 600px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.top-bar .logo {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text);
}

@media (max-width: 480px) {
    .landing h1 { font-size: 1.7rem; }
    .cover-section { height: 140px; }
    .avatar-wrapper, .avatar-wrapper img {
        width: 84px;
        height: 84px;
    }
    .display-name { font-size: 1.25rem; }
    .containero {
        padding:0;
    }
    .profile-wrapper {
        border-radius:0;
    }
}

.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
