/* PROFILE BANNER */
.profile-banner {
    position: relative;
    height: 35vh;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 42, 30, 0.5);
}

.avatar-wrapper {
    position: absolute;
    bottom: -55px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.profile-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid white;
    overflow: hidden;
    background: #ccc;
}

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

/* PROFILE MAIN */
.profile-main {
    background: url("../assets/martin.jpg") center/cover no-repeat;
    position: relative;
    padding: 4rem 0 6rem;
    isolation: isolate;
    min-height: 60vh;
}

.profile-main::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(18, 42, 30, 0.55) 0%,
        rgba(18, 42, 30, 0.8) 100%
    );
    z-index: 0;
}

.profile-main > * {
    position: relative;
    z-index: 1;
}

/* PROFILE CONTENT */
.profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    padding-top: 4rem;
}

.profile-info {
    text-align: center;
    color: white;
}

.profile-info h2 {
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.profile-username {
    font-size: 1rem;
    opacity: 0.75;
    margin-bottom: 0.4rem;
}

.profile-email {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 0.4rem;
}

.profile-member {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 1.5rem;
}

.create-post-btn {
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.logout-btn {
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    background: rgba(180, 50, 50, 0.85);
}

.logout-btn:hover {
    background: rgba(200, 40, 40, 1);
}

/* STATS */
.profile-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem 2.5rem;
    text-align: center;
    color: white;
    min-width: 120px;
}

.stat-card h3 {
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.stat-card p {
    font-size: 0.85rem;
    opacity: 0.75;
}

/* CATCHES SECTION */
.profile-catches {
    width: 100%;
    max-width: 700px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 2rem;
    color: white;
}

.profile-catches h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.no-catches {
    opacity: 0.6;
    font-size: 0.9rem;
}

/* PROFIL-KNAPPAR */
.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin-top: 1rem;
}

.btn-edit {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.35);
    padding: 0.65rem 1.4rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.btn-edit:hover {
    background: rgba(255,255,255,0.28);
}

/* MODAL */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.open {
    display: flex;
}

.edit-modal {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    color: #1f2933;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.edit-modal h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #1f2933;
}

/* AVATAR REDIGERING */
.avatar-edit-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.avatar-edit-circle {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid #2f6f4e;
}

.avatar-edit-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.avatar-overlay-btn {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.avatar-edit-circle:hover .avatar-overlay-btn {
    opacity: 1;
}

.avatar-hint {
    font-size: 0.78rem;
    color: #888;
}

/* FORMULÄR */
.edit-form-group {
    margin-bottom: 1.1rem;
}
.edit-form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.edit-form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    color: #1f2933;
}
.edit-form-group input:focus {
    border-color: #2f6f4e;
}

/* STATUS */
.edit-status {
    font-size: 0.85rem;
    min-height: 1.2rem;
    margin-bottom: 0.75rem;
    text-align: center;
}
.edit-status.success { color: #2f6f4e; font-weight: 600; }
.edit-status.error   { color: #c0392b; font-weight: 600; }

/* KNAPPAR */
.edit-modal-actions {
    display: flex;
    gap: 0.75rem;
}
.save-btn {
    flex: 1;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    text-align: center;
}
.btn-cancel {
    flex: 1;
    background: #f0f0f0;
    color: #333;
    border: none;
    padding: 0.8rem 1rem;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.btn-cancel:hover {
    background: #e0e0e0;
}
