:root{
    --navy:#101B3A;
    --cream:#F7F1E7;
    --beige:#D8C3A5;
    --gold:#C9A24D;

    /* overwritten at runtime by app.js via data.theme */
    --card-color: rgba(255,255,255,0.08);
    --accent-color: var(--gold);
    --logo-opacity: 0.14;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
    min-height:100vh;

    background:linear-gradient(135deg, var(--navy), #050914);

    font-family:'Inter', 'Vazirmatn', sans-serif;

    display:flex;
    justify-content:center;
    align-items:flex-start;
    padding:40px 20px;
}

html[dir="rtl"] body{
    font-family:'Vazirmatn', 'Inter', sans-serif;
}

/* ===== Card ===== */

.card{
    position:relative;

    width:100%;
    max-width:420px;

    background:var(--navy);

    border:1px solid rgba(255,255,255,0.2);
    border-radius:30px;

    box-shadow:0 25px 60px rgba(0,0,0,0.4);

    overflow:hidden;
}

/* ===== Background logo watermark =====
   The logo file MUST have a transparent background (config/profile.json
   -> profile.logo). Its alpha shape is used as a CSS mask and filled
   with a flat cream color, so only the mark itself shows — no photo,
   no rectangle, no background — just the shape, faint and blurred. */

.background-logo{
    position:absolute;
    inset:0;

    background-color:var(--cream);

    -webkit-mask-image:var(--logo-url);
    mask-image:var(--logo-url);

    -webkit-mask-repeat:no-repeat;
    mask-repeat:no-repeat;

    -webkit-mask-position:center;
    mask-position:center;

    -webkit-mask-size:65%;
    mask-size:65%;

    opacity:var(--logo-opacity);
    filter:blur(1px);

    pointer-events:none;
    z-index:0;
}

.content{
    position:relative;
    z-index:1;

    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;

    padding:30px 30px 40px;
}

/* ===== Top bar (settings + language switch) ===== */

.top-bar{
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
}

.icon-btn{
    width:32px;
    height:32px;

    display:flex;
    align-items:center;
    justify-content:center;

    border:1px solid rgba(255,255,255,0.3);
    border-radius:50%;

    background:rgba(255,255,255,0.08);
    color:var(--cream);

    cursor:pointer;
    transition:background .2s ease, color .2s ease, transform .15s ease;
}

.icon-btn:hover{
    background:var(--accent-color);
    color:var(--navy);
    transform:translateY(-2px);
}

.language-switch{
    display:flex;
    gap:8px;
}

.language-switch button{
    padding:6px 14px;

    border:1px solid rgba(255,255,255,0.3);
    border-radius:20px;

    background:rgba(255,255,255,0.08);
    color:var(--cream);

    font-family:inherit;
    font-size:12px;
    font-weight:600;
    cursor:pointer;

    transition:background .2s ease, color .2s ease, transform .15s ease;
}

.language-switch button:hover{
    background:var(--accent-color);
    color:var(--navy);
    transform:translateY(-2px);
}

.language-switch button.active{
    background:var(--accent-color);
    color:var(--navy);
}

/* ===== Profile ===== */

.profile{
    width:130px;
    height:130px;

    border-radius:50%;
    object-fit:cover;

    border:4px solid var(--accent-color);

    margin-bottom:20px;
    margin-top:10px;

    box-shadow:0 10px 25px rgba(0,0,0,0.35);
}

#name{
    color:var(--cream);
    font-size:24px;
    margin:0 0 6px 0;
}

#title{
    color:var(--accent-color);
    font-size:15px;
    font-weight:600;
    margin:0 0 16px 0;
}

#description{
    color:rgba(247,241,231,0.8);
    font-size:14px;
    line-height:1.7;
    margin:0 0 25px 0;
}

/* ===== Contacts ===== */

.contacts{
    width:100%;

    display:flex;
    flex-direction:column;
    gap:12px;
}

.contact-card{
    display:flex;
    align-items:center;
    gap:14px;

    width:100%;

    padding:14px 18px;

    background:rgba(255,255,255,0.06);
    border:1px solid rgba(255,255,255,0.15);
    border-radius:16px;

    text-decoration:none;
    color:var(--cream);

    transition:background .2s ease, transform .15s ease, border-color .2s ease;
}

.contact-card:hover{
    background:var(--accent-color);
    border-color:var(--accent-color);
    color:var(--navy);
    transform:translateY(-3px);
}

.contact-card i{
    width:22px;
    text-align:center;
    font-size:18px;
    color:var(--accent-color);
    transition:color .2s ease;
}

.contact-card:hover i{
    color:var(--navy);
}

.contact-card span{
    font-size:14px;
    font-weight:500;
}

/* ===== Settings overlay / panel ===== */

.settings-overlay{
    display:none;
    position:fixed;
    inset:0;
    z-index:50;

    background:rgba(5,9,20,0.7);

    align-items:center;
    justify-content:center;

    padding:20px;
}

.settings-overlay.open{
    display:flex;
}

.settings-panel{
    width:100%;
    max-width:400px;
    max-height:85vh;

    background:var(--navy);
    border:1px solid rgba(255,255,255,0.2);
    border-radius:24px;

    padding:24px;

    overflow-y:auto;

    color:var(--cream);
}

.settings-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:16px;
}

.settings-header h3{
    margin:0;
    font-size:16px;
}

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

.settings-list-item{
    display:flex;
    align-items:center;
    gap:10px;

    padding:10px 12px;

    background:rgba(255,255,255,0.06);
    border:1px solid rgba(255,255,255,0.12);
    border-radius:12px;

    font-size:13px;
}

.settings-list-item i.item-icon{
    color:var(--accent-color);
    width:18px;
    text-align:center;
}

.settings-list-item .item-label{
    flex:1;
    display:flex;
    flex-direction:column;
    gap:2px;
    overflow:hidden;
}

.settings-list-item .item-label small{
    color:rgba(247,241,231,0.55);
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.settings-list-item .remove-btn{
    background:none;
    border:none;
    color:#e07a7a;
    cursor:pointer;
    font-size:15px;
    padding:4px;
}

.settings-list-item .remove-btn:hover{
    color:#ff9d9d;
}

.settings-panel hr{
    border:none;
    border-top:1px solid rgba(255,255,255,0.15);
    margin:16px 0;
}

.settings-form{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.settings-form label{
    display:flex;
    flex-direction:column;
    gap:6px;
    font-size:12px;
    color:rgba(247,241,231,0.7);
}

.settings-form input,
.settings-form select{
    padding:10px 12px;

    border-radius:10px;
    border:1px solid rgba(255,255,255,0.2);

    background:rgba(255,255,255,0.06);
    color:var(--cream);

    font-family:inherit;
    font-size:13px;
}

.settings-form select option{
    background:var(--navy);
    color:var(--cream);
}

.checkbox-row{
    display:flex;
    gap:16px;
}

.checkbox-row label{
    flex-direction:row;
    align-items:center;
    gap:6px;
    font-size:12px;
}

.btn-primary{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;

    padding:12px;
    margin-top:4px;

    border:none;
    border-radius:12px;

    background:var(--accent-color);
    color:var(--navy);

    font-weight:600;
    font-size:13px;
    cursor:pointer;

    transition:filter .2s ease;
}

.btn-primary:hover{
    filter:brightness(1.1);
}

.btn-secondary{
    width:100%;
    margin-top:14px;

    padding:10px;

    border:1px solid rgba(255,255,255,0.2);
    border-radius:12px;

    background:transparent;
    color:rgba(247,241,231,0.7);

    font-size:12px;
    cursor:pointer;
}

.btn-secondary:hover{
    color:var(--cream);
    border-color:rgba(255,255,255,0.4);
}

/* ===== Responsive ===== */

@media(max-width:450px){
    .content{
        padding:50px 20px 30px;
    }
}
