* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: Tahoma, 'Segoe UI', sans-serif;
    background: #fafafa;
    color: #333;
    padding-bottom: 75px;
    direction: rtl;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

/* ==================== TOP ACTIONS ==================== */
.top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
}

.close-btn {
    background: #f0f0f0;
    border: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    font-family: inherit;
}

.close-btn:active {
    background: #e0e0e0;
}

.top-icons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: #fdeee6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:active {
    background: #fad9c8;
}

/* ==================== PROFILE HEADER ==================== */
.profile-header {
    text-align: center;
    margin-top: 10px;
    padding: 0 15px;
}

.profile-header h2 {
    color: #e87a4a;
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 4px;
}

.profile-header .city {
    color: #999;
    font-size: 13px;
}

/* ==================== AVATAR ==================== */
.avatar-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.avatar {
    width: 110px !important;
    height: 110px !important;
    max-width: 110px !important;
    max-height: 110px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 3px solid #f5c5a8;
    background: #eee;
    display: block;
}

.avatar-placeholder {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #999;
    border: 3px solid #f5c5a8;
}

/* ==================== READY BUTTON ==================== */
.ready-btn-wrapper {
    text-align: center;
    margin: 15px 0;
}

.ready-btn {
    display: inline-block;
    padding: 10px 30px;
    background: #fff;
    border: 1.5px solid #e87a4a;
    color: #e87a4a;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
}

.ready-btn:active {
    background: #fdeee6;
}

/* ==================== HINT ==================== */
.hint {
    text-align: center;
    color: #999;
    font-size: 12.5px;
    margin-bottom: 20px;
    padding: 0 30px;
    line-height: 1.6;
}

/* ==================== ACTION BUTTONS ==================== */
.action-buttons {
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    gap: 6px;
    margin-bottom: 20px;
}

.action-buttons button {
    flex: 1;
    padding: 10px 6px;
    background: #fff;
    border: 1.5px solid #e87a4a;
    color: #e87a4a;
    border-radius: 20px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.action-buttons button:active {
    background: #fdeee6;
}

.action-buttons button.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ==================== BIO DISPLAY ==================== */
.bio-display {
    margin: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.bio-display strong {
    color: #e87a4a;
    font-size: 13px;
    display: block;
    margin-bottom: 6px;
}

.bio-display p {
    color: #666;
    font-size: 13px;
    line-height: 1.7;
}

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    width: 100%;
    max-width: 350px;
}

.modal h3 {
    color: #e87a4a;
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
}

.modal input,
.modal textarea {
    width: 100%;
    padding: 10px;
    border: 1.5px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 12px;
    resize: none;
}

.modal input:focus,
.modal textarea:focus {
    outline: none;
    border-color: #e87a4a;
}

.modal-buttons {
    display: flex;
    gap: 8px;
}

.modal-buttons button {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    border: none;
}

.btn-save {
    background: #e87a4a;
    color: #fff;
}

.btn-save:active {
    background: #d66a3a;
}

.btn-cancel {
    background: #f0f0f0;
    color: #666;
}

.btn-cancel:active {
    background: #e0e0e0;
}

/* ==================== BOTTOM NAV ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 6px 0;
    z-index: 100;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    color: #bbb;
    text-decoration: none;
    font-size: 10.5px;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-item .icon {
    font-size: 18px;
    margin-bottom: 2px;
    filter: grayscale(100%);
    opacity: 0.5;
}

.nav-item.active {
    color: #e87a4a;
    font-weight: bold;
}

.nav-item.active .icon {
    filter: none;
    opacity: 1;
}

.nav-item.disabled {
    opacity: 0.35;
    pointer-events: none;
}