/* profile/style.css — MD Colab v2 */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;500;600;700;800&family=DM+Sans:wght@300;400;500;600&family=Fira+Code:wght@400;500&display=swap');

:root {
    --bg-main: #0a0a0d;
    --bg-card: #111118;
    --bg-glass: rgba(17, 17, 24, 0.75);
    --bg-hover: #1c1c28;
    --border: rgba(255,255,255,0.07);
    --border-glow: rgba(255, 111, 0, 0.35);
    --primary: #FF6F00;
    --primary-hover: #e65c00;
    --primary-dim: rgba(255, 111, 0, 0.12);
    --accent: #7c3aed;
    --green: #22c55e;
    --text-light: #f0f0f5;
    --text-muted: #7a7a96;
    --danger: #ef4444;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 8px 32px rgba(0,0,0,0.45);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ─── AMBIENT BACKGROUND ─────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    top: -40%;
    left: -20%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,111,0,0.055) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}
body::after {
    content: '';
    position: fixed;
    bottom: -30%;
    right: -15%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,58,237,0.04) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

/* ─── TOP NAV ─────────────────────────────────────────── */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 64px;
    background: rgba(10,10,13,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    gap: 10px;
    align-items: center;
    letter-spacing: -0.3px;
}
.logo {
    border-radius: 50%;
    border: 2px solid var(--primary);
}
.nav-right { display: flex; align-items: center; gap: 12px; }

/* Nav Profile Wrapper */
.nav-profile-wrapper { position: relative; cursor: pointer; }
#nav-profile-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid var(--border-glow);
    object-fit: cover;
    transition: border-color 0.2s, transform 0.2s;
}
#nav-profile-img:hover { transform: scale(1.06); border-color: var(--primary); }

/* Account Dropdown */
.account-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 2000;
    overflow: hidden;
}
.account-dropdown.show { display: block; animation: dropIn 0.2s ease-out; }
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.current-account-header {
    padding: 14px 16px;
    font-family: 'Syne', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255,111,0,0.04);
    border-bottom: 1px solid var(--border);
}
.account-list { max-height: 240px; overflow-y: auto; }
.account-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.2s;
    cursor: pointer;
}
.account-item:hover { background: var(--bg-hover); }
.account-item.active { background: var(--primary-dim); cursor: default; }
.account-item.active .acc-name { color: var(--primary); }
.acc-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.acc-info { flex: 1; overflow: hidden; }
.acc-name { display: block; color: white; font-size: 0.88rem; font-weight: 500; }
.acc-email { display: block; color: var(--text-muted); font-size: 0.72rem; }

.verified-tick {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.2em; height: 1.2em; color: white; border-radius: 50%;
    font-size: 0.8em; margin-left: 6px; vertical-align: middle; transform: translateY(-1px);
}
.verified-tick img { width: 30px; border-radius: 50px; margin-left: -16px; margin-bottom: 24px; }

.account-actions { background: var(--bg-main); border-top: 1px solid var(--border); }
.AT3 { display: flex; width: 100%; margin: 8px 10px 0; padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.action-item {
    width: 100%; text-align: left; background: none; border: none;
    padding: 13px 16px; color: var(--text-light); font-size: 0.88rem;
    cursor: pointer; display: flex; align-items: center; gap: 10px;
    font-family: 'DM Sans', sans-serif; transition: background 0.2s;
}
.action-item:hover { background: var(--bg-hover); }
.action-item.danger { color: var(--danger); border-top: 1px solid var(--border); }
.action-item.danger:hover { background: rgba(239,68,68,0.08); }

/* ─── LAYOUT ──────────────────────────────────────────── */
.main-layout {
    position: relative;
    z-index: 1;
    padding: 2rem;
    max-width: 1080px;
    margin: 0 auto;
}

/* ─── TAB NAV ─────────────────────────────────────────── */
.tab-nav {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}
.tab-nav::-webkit-scrollbar { display: none; }

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    padding: 12px 18px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn:hover:not(.active) { color: var(--text-light); }
.tab-content { display: none; animation: tabFade 0.25s ease; }
.tab-content.active { display: block; }
@keyframes tabFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ─── PROFILE TAB LAYOUT ──────────────────────────────── */
#tab-profile {
    display: none;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    align-items: center;
}
#tab-profile.active { display: grid; }

@media (max-width: 860px) {
    #tab-profile.active { display: flex;
    flex-direction: column;
 }
}

/* ─── PROFILE CARD (LEFT) ─────────────────────────────── */
.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
    top: 80px;
    width: 100%;
}

.profile-picture-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 1.25rem;
}
#profile-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 0 0 6px var(--primary-dim);
}
.photo-edit-overlay {
    position: absolute; bottom: 2px; right: 2px;
    background: var(--primary); color: white;
    width: 32px; height: 32px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: 2px solid var(--bg-card);
    font-size: 0.8rem; transition: 0.2s;
}
.photo-edit-overlay:hover { transform: scale(1.1); background: var(--primary-hover); }
input[type="file"] { display: none; }

#profile-name {
    font-family: 'Syne', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    letter-spacing: -0.5px;
}
#profile-email { color: var(--text-muted); font-size: 0.82rem; margin-bottom: 0.9rem; }

.badge-role {
    background: var(--primary-dim);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid rgba(255,111,0,0.25);
    display: inline-block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.profile-actions {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Info Sections */
.info-section {
    text-align: left;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
    margin-top: 1.25rem;
}
.info-section h4 {
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 0.9rem;
    font-family: 'Syne', sans-serif;
}
.bio-text { color: var(--text-light); font-size: 0.88rem; line-height: 1.65; }
.skills-container { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-tag {
    background: var(--bg-hover);
    color: var(--text-light);
    padding: 4px 11px;
    border-radius: 6px;
    font-size: 0.77rem;
    border: 1px solid var(--border);
    transition: border-color 0.2s, color 0.2s;
}
.skill-tag:hover { border-color: var(--primary); color: var(--primary); }
.address-display {
    display: flex; align-items: center; gap: 9px;
    color: var(--text-muted); font-size: 0.87rem; margin-bottom: 0.9rem;
}
.socials-container { display: flex; flex-wrap: wrap; gap: 9px; }
.social-link-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; font-size: 0.95rem;
    color: var(--text-muted); background: var(--bg-hover);
    border: 1px solid var(--border); border-radius: 50%;
    text-decoration: none; transition: all 0.2s;
}
.social-link-icon:hover { background: var(--primary); border-color: var(--primary); color: white; transform: scale(1.08); }

/* ─── PROFILE RIGHT PANEL ─────────────────────────────── */
.profile-right-panel { display: flex; flex-direction: column; gap: 1.5rem; width:100%;}

.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
}
.panel-card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.25rem; padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
.panel-card-header h3 {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex; align-items: center; gap: 8px;
    color: var(--text-light);
}
.panel-card-header h3 i { color: var(--primary); }

/* Activity Stats Row */
.activity-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.activity-stat {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1.1rem;
    text-align: center;
    transition: border-color 0.2s, transform 0.2s;
}
.activity-stat:hover { border-color: var(--primary); transform: translateY(-2px); }
.activity-stat .stat-num {
    font-family: 'Syne', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.3rem;
}
.activity-stat .stat-lbl { color: var(--text-muted); font-size: 0.77rem; font-weight: 500; }

/* Membership Info */
.membership-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.membership-info-item {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.9rem 1rem;
}
.membership-info-item .mi-label {
    color: var(--text-muted); font-size: 0.72rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px;
    margin-bottom: 4px;
}
.membership-info-item .mi-value { font-size: 0.9rem; font-weight: 500; color: var(--text-light); }

/* Quick Links */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
.quick-link-item {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-hover); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 0.9rem 1rem;
    text-decoration: none; color: var(--text-light);
    font-size: 0.85rem; font-weight: 500;
    transition: all 0.2s;
}
.quick-link-item:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }
.quick-link-item i { color: var(--primary); font-size: 1rem; }

/* ─── EDIT FORM ───────────────────────────────────────── */
#edit-form { text-align: left; margin-top: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--bg-main);
    border: 1px solid var(--border);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: white;
    outline: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.form-actions { display: flex; gap: 10px; margin-top: 1rem; }

/* Markdown Editor */
.markdown-editor {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    border: 1px solid var(--border); padding: 10px; border-radius: var(--radius-sm); background: var(--bg-main);
}
.markdown-editor textarea { border: none; background: transparent; height: 220px; resize: none; color: white; font-family: 'Fira Code', monospace; }
.markdown-preview-area {
    background: #07070a; padding: 14px; border-radius: 6px;
    color: #ccc; font-size: 0.88rem; height: 220px; overflow-y: auto;
}
.markdown-preview-area h1, .markdown-preview-area h2 { margin-top: 0; border-bottom: 1px solid #222; padding-bottom: 5px; }
.markdown-preview-area code { background: #000; padding: 2px 6px; border-radius: 4px; font-family: 'Fira Code', monospace; }
.markdown-preview-area blockquote { border-left: 3px solid var(--primary); margin-left: 0; padding-left: 14px; color: #888; }

/* ─── OVERVIEW TAB ────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.4rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.stat-icon {
    width: 48px; height: 48px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 1.35rem;
}
.stat-icon.orange { background: var(--primary-dim); color: var(--primary); }
.stat-icon.purple { background: rgba(124,58,237,0.12); color: #8b5cf6; }
.stat-icon.green { background: rgba(34,197,94,0.1); color: var(--green); }
.stat-info h3 { font-family: 'Syne', sans-serif; font-size: 1.75rem; font-weight: 700; margin: 0; }
.stat-info p { color: var(--text-muted); font-size: 0.82rem; margin: 0; }

.collab-details-section { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
@media (max-width: 768px) { .collab-details-section { grid-template-columns: 1fr; } }
.detail-column { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.item-list-container { display: flex; flex-direction: column; gap: 9px; max-height: 300px; overflow-y: auto; }
.list-item-card {
    background: rgba(255,255,255,0.04);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    display: flex; justify-content: space-between; align-items: center;
    border: 1px solid transparent;
    transition: border-color 0.2s;
}
.list-item-card:hover { border-color: var(--primary); }

/* ─── PORTFOLIO BUILDER TAB ───────────────────────────── */
.content-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-top: 1rem;
}
.section-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}
.section-header h2 {
    font-family: 'Syne', sans-serif;
    font-size: 1.15rem;
    display: flex; align-items: center; gap: 10px;
}
.setting-row {
    display: flex; flex-wrap: wrap; align-items: center;
    justify-content: space-between; gap: 20px;
    padding-bottom: 1rem; margin-bottom: 1rem;
}
@media (max-width: 600px) { .setting-row { flex-direction: column; align-items: flex-start; } }
.input-with-prefix {
    display: flex; align-items: center;
    background: var(--bg-main); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding-left: 10px;
}
.input-with-prefix span { color: var(--text-muted); font-size: 0.85rem; font-family: 'Fira Code', monospace; }
.input-with-prefix input { border: none; flex: 1; padding-left: 5px; background: transparent; }
.full-width-select {
    width: 100%; padding: 10px 12px;
    background: var(--bg-main); color: white;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    margin-bottom: 5px; cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 0.9rem;
    transition: border-color 0.2s;
}
.full-width-select:focus { border-color: var(--primary); outline: none; }
.dynamic-fields-box {
    background: rgba(255,255,255,0.02);
    border: 1px dashed var(--border);
    padding: 15px; border-radius: var(--radius-sm); margin-bottom: 20px; margin-top: 10px;
}

/* Switch Toggle */
.switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #2a2a3a; transition: .3s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background: white; transition: .3s; border-radius: 50%; }
input:checked + .slider { background: var(--primary); }
input:checked + .slider:before { transform: translateX(22px); }

/* Perk Message */
.perk-message {
    background: rgba(255,152,0,0.05);
    border: 1px solid rgba(255,152,0,0.2);
    border-radius: 8px; padding: 10px 14px;
    font-size: 0.83rem; color: var(--text-muted);
    display: flex; align-items: center; gap: 10px;
}
.perk-message i { color: var(--primary); }
.perk-message a { color: var(--primary); text-decoration: none; font-weight: 600; }
.perk-message a:hover { text-decoration: underline; }

/* Validation */
.validation-msg { font-size: 0.8rem; margin-top: 5px; }
.validation-msg.valid { color: var(--green); }
.validation-msg.invalid { color: var(--danger); }


/* ─── ACCOUNT TAB ─────────────────────────────────────── */
.device-item {
    background: rgba(255,255,255,0.04);
    padding: 12px 14px; max-width: 100%;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; border: 1px solid var(--border); margin-bottom: 9px;
}
.device-info { display: flex; align-items: center; gap: 14px; overflow: hidden; flex-shrink: 1; min-width: 0; }
.device-icon { font-size: 1.4rem; color: var(--text-muted); flex-shrink: 0; }
.device-details p { margin: 0; font-size: 0.88rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-details small { font-size: 0.73rem; color: var(--text-muted); }
.device-tag { font-size: 0.68rem; font-weight: 600; padding: 2px 7px; border-radius: 4px; margin-left: 7px; }
.tag-current { background: rgba(34,197,94,0.1); color: var(--green); }
.btn-remove-device {
    background: transparent; border: 1px solid var(--danger);
    color: var(--danger); padding: 5px 11px; border-radius: 6px;
    cursor: pointer; font-size: 0.78rem; font-weight: 500;
    transition: all 0.2s; flex-shrink: 0;
}
.btn-remove-device:hover { background: var(--danger); color: white; }
.btn-remove-device:disabled { opacity: 0.4; cursor: not-allowed; border-color: var(--border); color: var(--text-muted); }

/* ─── BUTTONS ─────────────────────────────────────────── */
.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.88rem;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.2s, transform 0.15s;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
    padding: 11px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 0.88rem; font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    transition: background 0.2s, border-color 0.2s;
}
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--border-glow); }

.btn-danger {
    background: rgba(239,68,68,0.1); color: var(--danger);
    border: 1px solid var(--danger); padding: 10px 18px;
    border-radius: var(--radius-sm); cursor: pointer;
    font-family: 'DM Sans', sans-serif; transition: all 0.2s;
}
.btn-danger:hover { background: var(--danger); color: white; }
.full-width { width: 100%; }
.small { padding: 8px 14px; font-size: 0.83rem; }

.btn-add-link {
    width: 100%; padding: 10px;
    background: transparent; border: 1px dashed var(--border);
    color: var(--text-muted); border-radius: var(--radius-sm);
    cursor: pointer; margin-top: 8px;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s;
}
.btn-add-link:hover { background: var(--bg-hover); color: var(--text-light); border-color: var(--primary); }

/* Custom Links */
.custom-link-group { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.custom-link-group input {
    width: 100%; background: var(--bg-main); border: 1px solid var(--border);
    padding: 10px 12px; border-radius: var(--radius-sm); color: white; outline: none;
    font-family: 'DM Sans', sans-serif; margin-bottom: 0; transition: border-color 0.2s;
}
.custom-link-group input:focus { border-color: var(--primary); }
.custom-link-group input.link-label { flex: 1; }
.custom-link-group input.link-url { flex: 2; }
.remove-custom-link-btn {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-muted); width: 36px; height: 36px; border-radius: 50%;
    cursor: pointer; flex-shrink: 0; transition: all 0.2s;
}
.remove-custom-link-btn:hover { background: rgba(239,68,68,0.1); color: var(--danger); border-color: var(--danger); }
.custom-link-tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--bg-hover); color: var(--text-light);
    padding: 4px 11px; border-radius: 6px; font-size: 0.78rem;
    border: 1px solid var(--border); text-decoration: none; transition: all 0.2s;
}
.custom-link-tag:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* ─── MODALS ──────────────────────────────────────────── */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
    display: flex; justify-content: center; align-items: center;
    z-index: 3000;
}
.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: var(--radius);
    width: 90%;
    max-width: 420px;
    position: relative;
    text-align: center;
    box-shadow: var(--shadow);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.93) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header h2 { font-family: 'Syne', sans-serif; font-size: 1.2rem; margin-bottom: 0.5rem; }
.close-modal-btn { position: absolute; top: 14px; right: 14px; background: none; border: none; color: var(--text-muted); font-size: 1.2rem; cursor: pointer; transition: color 0.2s; }
.close-modal-btn:hover { color: white; }
.pin-box {
    background: var(--bg-main); padding: 14px; border-radius: var(--radius-sm);
    margin-top: 18px; border: 1px solid var(--primary);
    display: flex; justify-content: space-between; align-items: center;
    font-family: 'Fira Code', monospace; color: var(--primary); letter-spacing: 3px;
}

/* OTP Input */
#otp-entry { border: 2px solid var(--border); background: #050508; transition: border-color 0.2s; }
#otp-entry:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }

/* ─── JSON Editor Modal ───────────────────────────────── */
.btn-manage {
    position: absolute; top: 28px; right: 8px;
    background: var(--primary); color: white; border: none;
    padding: 4px 10px; font-size: 0.72rem; border-radius: 4px;
    cursor: pointer; font-weight: 600;
}
.btn-manage:hover { background: var(--primary-hover); }
.json-editor-container { position: relative; }
#modal-item-list .list-item-card { padding: 12px; align-items: flex-start; }
.modal-item-content { flex-grow: 1; }
.modal-item-content p { margin: 0; font-size: 0.88rem; color: #eee; }
.modal-item-content small { color: var(--text-muted); font-size: 0.73rem; display: block; max-width: 350px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.modal-item-actions { display: flex; gap: 7px; margin-left: 9px; }
.modal-item-actions button {
    background: none; border: 1px solid var(--border); color: var(--text-muted);
    width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.modal-item-actions button:hover { background: var(--bg-hover); color: white; }
.modal-item-actions .delete-btn:hover { background: rgba(239,68,68,0.1); color: var(--danger); border-color: var(--danger); }
.modal-form-area { background: var(--bg-main); padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* ─── TOAST ───────────────────────────────────────────── */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 6000; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: var(--bg-card);
    border-left: 3px solid var(--primary);
    padding: 13px 18px; color: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    font-size: 0.88rem;
    animation: slideIn 0.3s ease;
    max-width: 320px;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--green); }
@keyframes slideIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── GLOBAL LOADER ───────────────────────────────────── */
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ─── NAV ICON ────────────────────────────────────────── */
.nav-icon-btn { transition: color 0.2s; display: flex; align-items: center; }
.nav-icon-btn:hover { color: var(--primary) !important; }

/* ─── MISC ────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-muted.small { font-size: 0.83rem; }
input[type="color"] { -webkit-appearance: none; border: none; padding: 0; border-radius: 6px; background: var(--bg-main); cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 1px solid var(--border); border-radius: 6px; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2a2a3a; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }


/* ──────────────────────────────────────────────────────────────────────────
   MD TECHNOLOGIES PORTFOLIO BUILDER REDESIGN v3 — PREMIUM GLASSMORPHISM
   ────────────────────────────────────────────────────────────────────────── */

/* Glassmorphism settings cards */
.settings-premium-card {
    background: rgba(13, 13, 23, 0.45) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 20px !important;
    padding: 28px !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.3) !important;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
    position: relative;
    overflow: hidden;
}
.settings-premium-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    z-index: 1;
}
.settings-premium-card:hover {
    border-color: rgba(255, 111, 0, 0.15) !important;
    box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.4), 0 0 20px 0 rgba(255, 111, 0, 0.03) !important;
    transform: translateY(-2px);
}

/* Active primary focus glow for all inputs */
.settings-premium-card input,
.settings-premium-card select,
.settings-premium-card textarea {
    background: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 0.9rem !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.settings-premium-card input:focus,
.settings-premium-card select:focus,
.settings-premium-card textarea:focus {
    border-color: var(--primary) !important;
    background: rgba(0, 0, 0, 0.35) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.15) !important;
}

/* Premium toggle switch */
.premium-switch-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 14px 18px;
    transition: all 0.3s ease;
}
.premium-switch-container:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}
.premium-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}
.premium-switch input {
    opacity: 0; width: 0; height: 0;
}
.premium-slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.premium-slider:before {
    position: absolute; content: "";
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background: #ffffff;
    transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.premium-switch input:checked + .premium-slider {
    background: var(--primary) !important;
    box-shadow: 0 0 10px rgba(255, 111, 0, 0.25);
}
.premium-switch input:checked + .premium-slider:before {
    transform: translateX(24px);
}

/* Beautiful live visual preview items list */
.portfolio-item-preview {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.04) !important;
    border-radius: 12px !important;
    padding: 12px 18px !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}
.portfolio-item-preview:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 111, 0, 0.25) !important;
    transform: translateX(4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15) !important;
}
.portfolio-item-preview img {
    border: 2px solid rgba(255, 255, 255, 0.05) !important;
    transition: all 0.3s ease;
}
.portfolio-item-preview:hover img {
    border-color: var(--primary) !important;
    transform: scale(1.05);
}

/* Premium Cloudinary Upload Zone */
.cloudinary-upload-area {
    margin-top: 6px;
}
.cld-drop-zone {
    background: rgba(255, 255, 255, 0.01) !important;
    border: 2px dashed rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    padding: 24px !important;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.cld-drop-zone:hover, .cld-drop-zone.drag-over {
    background: rgba(255, 111, 0, 0.02) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 16px rgba(255, 111, 0, 0.05) !important;
}
.cld-drop-zone i {
    color: var(--text-muted);
    font-size: 2rem !important;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}
.cld-drop-zone:hover i, .cld-drop-zone.drag-over i {
    color: var(--primary) !important;
    transform: translateY(-4px);
}
.cld-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}
.cld-progress-bar-wrap {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}
.cld-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #ffa040);
    width: 0%;
    border-radius: 10px;
    transition: width 0.2s ease;
    box-shadow: 0 0 8px var(--primary);
}
.cld-progress span {
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

/* Micro-animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.slide-in-up {
    animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Dynamic fields section custom border highlights */
.dynamic-fields-box-premium {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    margin-top: 12px;
}

/* ==========================================================================
   MD THEME SWITCHER & LIGHT MODE IMPLEMENTATION
   ========================================================================== */

/* Light Mode Core Variables Overrides */
:root.light-mode {
    --bg-main: #f4f5f8;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --bg-hover: #eef0f6;
    --border: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(255, 111, 0, 0.25);
    --primary: #e65100;
    --primary-hover: #d84315;
    --primary-dim: rgba(230, 81, 0, 0.08);
    --accent: #6d28d9;
    --green: #166534;
    --text-light: #1e293b;
    --text-muted: #64748b;
    --danger: #dc2626;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Tactile Premium Theme Toggle Button */
.theme-toggle-btn {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    color: var(--text-light);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow);
    margin-right: 12px;
    outline: none;
}

.theme-toggle-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 0 12px var(--primary-dim);
}

.theme-toggle-btn:active {
    transform: scale(0.95);
}

/* Icon visibility state */
.theme-toggle-btn .sun-icon {
    display: block;
}
.theme-toggle-btn .moon-icon {
    display: none;
}

.light-mode .theme-toggle-btn .sun-icon {
    display: none;
}
.light-mode .theme-toggle-btn .moon-icon {
    display: block;
}

/* Light Mode Overrides for Hardcoded Dark Colors */
.light-mode body::before {
    background: radial-gradient(circle, rgba(255, 111, 0, 0.04) 0%, transparent 70%);
}
.light-mode body::after {
    background: radial-gradient(circle, rgba(109, 40, 217, 0.03) 0%, transparent 70%);
}

.light-mode .top-nav {
    background: rgba(244, 245, 248, 0.85);
}

.light-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.45);
}

/* Inputs and Forms */
.light-mode .form-group input,
.light-mode .form-group textarea,
.light-mode .form-group select {
    color: #1e293b !important;
}

.light-mode .markdown-editor {
    background: #ffffff;
}

.light-mode .markdown-editor textarea {
    color: #1e293b !important;
}

.light-mode .markdown-preview-area {
    background: #f8fafc;
    color: #334155;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Portfolio custom settings cards overrides */
.light-mode .settings-premium-card {
    background: rgba(255, 255, 255, 0.75) !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.04) !important;
}

.light-mode .settings-premium-card::before {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.03), transparent);
}

.light-mode .settings-premium-card:hover {
    border-color: rgba(255, 111, 0, 0.3) !important;
    box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.06), 0 0 20px 0 rgba(255, 111, 0, 0.02) !important;
}

.light-mode .settings-premium-card input,
.light-mode .settings-premium-card select,
.light-mode .settings-premium-card textarea {
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #1e293b !important;
}

.light-mode .settings-premium-card input:focus,
.light-mode .settings-premium-card select:focus,
.light-mode .settings-premium-card textarea:focus {
    background: rgba(255, 255, 255, 1) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(255, 111, 0, 0.1) !important;
}

.light-mode .settings-premium-card input::placeholder,
.light-mode .settings-premium-card textarea::placeholder {
    color: #94a3b8 !important;
}

.light-mode .premium-switch-container {
    background: rgba(0, 0, 0, 0.01);
    border-color: rgba(0, 0, 0, 0.03);
}

.light-mode .premium-switch-container:hover {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}

.light-mode .premium-slider {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.04);
}

.light-mode .premium-slider:before {
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

/* Custom dynamic elements container */
.light-mode .dynamic-fields-box-premium {
    background: rgba(0, 0, 0, 0.005);
    border-color: rgba(0, 0, 0, 0.03);
}

/* Code block inside details panel */
.light-mode .code-block-premium {
    background: #f8fafc !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
    color: #1e293b !important;
}

/* Premium Card Header — base desktop styles */
.premium-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 14px;
    width: 100%;
}
.light-mode .premium-card-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
}


