.profile-main-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
    min-height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-card {
    width: 100%;
    background: rgba(20, 20, 25, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.profile-header-banner {
    height: 120px;
    background: linear-gradient(135deg, #ff7b00, #ff4500);
    position: relative;
}

.profile-content {
    padding: 0 30px 30px 30px;
    position: relative;
    text-align: center;
}

.profile-avatar-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    margin: -55px auto 15px auto;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid #141419;
    object-fit: cover;
    background-color: #222;
}

.profile-status-dot {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    background-color: #2ecc71;
    border: 3px solid #141419;
    border-radius: 50%;
}

.profile-username {
    font-size: 26px;
    color: #fff;
    margin: 0 0 2px 0;
    font-weight: 700;
}

/* Styl dla systemowego handla / unikalnego ID nazwy (username_id) */
.profile-user-handle {
    font-size: 15px;
    color: #a0a4b8;
    margin-bottom: 8px;
    font-weight: 500;
}

.profile-discord-id {
    color: #888;
    font-size: 14px;
    margin-bottom: 25px;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.info-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.info-box i {
    font-size: 24px;
    color: #ff7b00;
}

.info-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 3px;
}

.info-value {
    font-size: 14px;
    color: #fff;
    font-weight: 600;
}

.status-active {
    color: #2ecc71;
}

/* Sekcja zarządzania adresem e-mail */
.profile-email-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: left;
}

.profile-email-section h4 {
    margin: 0 0 8px 0;
    color: #ff7b00;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-email-section p {
    font-size: 13px;
    color: #888;
    margin-bottom: 15px;
    line-height: 1.4;
}

.profile-email-display {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #fff;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
}

.profile-email-display i {
    color: #ff7b00;
}

.email-form-group {
    display: flex;
    gap: 10px;
}

.email-form-group input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 14px;
}

.email-form-group input:focus {
    border-color: #ff7b00;
    outline: none;
}

.btn-email-save {
    background: #ff7b00;
    color: #fff;
    border: none;
    padding: 0 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-email-save:hover {
    background: #e56d00;
}

.profile-inline-error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: #e74c3c;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 15px;
}

.profile-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-logout {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-logout:hover {
    background: #e74c3c;
    color: #fff;
}

/* Stan dla gościa (niezalogowany) */
.profile-guest {
    padding: 50px 20px;
    text-align: center;
}

.guest-icon {
    font-size: 48px;
    color: #ff7b00;
    margin-bottom: 15px;
}

.profile-guest h3 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 10px;
}

.profile-guest p {
    color: #aaa;
    font-size: 14px;
    max-width: 400px;
    margin: 0 auto 25px auto;
    line-height: 1.5;
}

.btn-discord-login {
    background: #5865F2;
    color: white;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.4);
}

.btn-discord-login:hover {
    background: #4752c4;
    transform: translateY(-2px);
}

/* Responsywność dla urządzeń mobilnych */
@media (max-width: 600px) {
    .profile-content {
        padding: 0 15px 20px 15px;
    }
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
    .email-form-group {
        flex-direction: column;
    }
    .btn-email-save {
        width: 100%;
        padding: 12px;
        justify-content: center;
    }
}